Commit 22dbfc68 authored by Jan Möbius's avatar Jan Möbius

Added isophotes Shader

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6023 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 271b04fb
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();
}
[FragmentShader]
file=Fragment.glsl
[Info]
example=Isophotes.png
name=Isophote Shader
version=1.0
[VertexShader]
file=Vertex.glsl
Markdown is supported
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