2009-08-25 09:00:24 +00:00
|
|
|
// simple facing ratio transparency shader
|
2009-08-25 08:55:32 +00:00
|
|
|
|
|
|
|
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)));
|
|
|
|
}
|