Download Now
Forums

    Reference ShadowPrecision

    Declared in Codebot.Render.Shaders.pas on line 147

    ShadowLighting is GLSL source for a fragment shader which reads a shadow map recorded by a TShadowBuffer. It defines the function
    float shadowLit(sampler2DShadow map, vec4 c)
    which returns how lit a point is from 0 to 1, where c is the point in the clip space of the light. Points outside of the map are lit. Put it before the uniforms of the shader, as on OpenGL ES it also gives sampler2DShadow the precision it needs.
    The map is filtered, so each lookup compares four texels and blends them. The shadow is softened by nine lookups a texel apart, except on the Raspberry Pi, which has too little fill rate for that at 1080p and uses four lookups half a texel apart, covering the same area with a little less softening.
    ShadowPrecision = '';