Skip to content
Snippets Groups Projects
Commit af0a0363 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added isophotes Shader

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6023 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2da45304
No related branches found
No related tags found
No related merge requests found
varying vec3 normal;
varying vec4 viewingDir;
uniform sampler2D texSamplerTMU0;
void main()
{
vec3 viewingDirCut = vec3(viewingDir.x, viewingDir.y, viewingDir.z);
float angle = dot ( normal , viewingDirCut );
vec2 coord;
coord.s = angle/3.14;
coord.t = angle/3.14;
gl_FragColor = texture2D (texSamplerTMU0 , coord) ;
}
Shaders/Isophotes Shader/Isophotes.png

24.9 KiB

varying vec3 normal;
varying vec4 viewingDir;
void main()
{
/* first transform the normal into eye space and
normalize the result */
normal = normalize(gl_NormalMatrix * gl_Normal);
vec4 viewingDirBase = vec4( 0.0,0.0,-1.0,0.0 );
viewingDir = viewingDirBase;
gl_Position = ftransform();
}
[FragmentShader]
file=Fragment.glsl
[Info]
example=Isophotes.png
name=Isophote Shader
version=1.0
[VertexShader]
file=Vertex.glsl
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment