Commit af0a0363 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added isophotes Shader

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2da45304
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) ;
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();
name=Isophote Shader
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment