groworld/plant-eyes/shaders/frtrans.frag.glsl
Dave Griffiths 3441be9942 comment fix
2009-08-25 10:00:24 +01:00

12 lines
233 B
GLSL

// simple facing ratio transparency shader
varying vec3 V;
varying vec3 N;
void main()
{
vec3 v = normalize(V);
vec3 n = normalize(N);
vec3 col=vec3(gl_FrontMaterial.diffuse);
gl_FragColor = vec4(col,1.0f-abs(dot(n,v)));
}