123456789101112131415161718192021222324252627 |
- /****************************
- Occlusion Light Shader
- (c) Mad Processor, 2009
- As with all baking-compatible
- shaders, one should not use
- the faceforward() call.
- *****************************/
- light lm_light_occlusion(
- float samples = 64;
- string __category = "occlusion";
- float intensity = 1;
- float maxbright = 1)
- {
- normal shading_normal = normalize(Ns);
- //normal shading_normal = normalize(N);
- illuminate( Ps + shading_normal )
- {
- //timos ansatz (subtractive occlusion)
- //Cl = -intensity*clamp(occlusion( Ps, shading_normal, samples ),0,1);
-
- //original (additive occlusion)
- Cl = (1 - occlusion( Ps, shading_normal, samples )) * intensity;
- //bake( "occ.bake", s, t, Cl );
- }
- }
|