123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- precision highp float;
- // Constants
- uniform vec3 vEyePosition;
- uniform float alpha;
- // Input
- varying vec3 vPositionW;
- #ifdef NORMAL
- varying vec3 vNormalW;
- #endif
- // Helper functions
- #include<helperFunctions>
- // Lights
- #include<__decl__lightFragment>[0..maxSimultaneousLights]
- #include<lightsFragmentFunctions>
- #include<shadowsFragmentFunctions>
- #include<clipPlaneFragmentDeclaration>
- // Fog
- #include<fogFragmentDeclaration>
- void main(void) {
- #include<clipPlaneFragment>
- vec3 viewDirectionW = normalize(vEyePosition - vPositionW);
- // Normal
- #ifdef NORMAL
- vec3 normalW = normalize(vNormalW);
- #else
- vec3 normalW = vec3(1.0, 1.0, 1.0);
- #endif
- // Lighting
- vec3 diffuseBase = vec3(0., 0., 0.);
- lightingInfo info;
- float shadow = 1.;
- float glossiness = 0.;
-
- #include<lightFragment>[0..1]
- // Composition
- vec4 color = vec4(0., 0., 0., (1.0 - clamp(shadow, 0., 1.)) * alpha);
- #include<fogFragment>
- gl_FragColor = color;
- }
|