samplerCubeShadow and texture offset
        Posted  
        
            by 
                Irbis
            
        on Game Development
        
        See other posts from Game Development
        
            or by Irbis
        
        
        
        Published on 2012-10-29T13:19:21Z
        Indexed on 
            2012/10/29
            17:25 UTC
        
        
        Read the original article
        Hit count: 354
        
I use sampler2DShadow when accessing a single shadow map. I create PCF in this way:
result += textureProjOffset(ShadowSampler, ShadowCoord, ivec2(-1,-1)); 
result += textureProjOffset(ShadowSampler, ShadowCoord, ivec2(-1,1)); 
result += textureProjOffset(ShadowSampler, ShadowCoord, ivec2(1,1)); 
result += textureProjOffset(ShadowSampler, ShadowCoord, ivec2(1,-1)); 
result = result * 0.25;
For a cube map I use samplerCubeShadow:
result = texture(ShadowCubeSampler, vec4(normalize(position), depth));
How to adopt above PCF when accessing a cube map ?
© Game Development or respective owner