/// <summary> /// Shadow map shader /// </summary> public ShadowMapShader() : base(ShaderFilename) { // We use R32F, etc. and have a lot of precision compareDepthBias = 0.0001f; // Ok, time to create the shadow map render target shadowMapTexture = new RenderToTexture( RenderToTexture.SizeType.ShadowMap); CalcShadowMapBiasMatrix(); shadowMapBlur = new ShadowMapBlur(); }
/// <summary> /// Shadow map shader /// </summary> public ShadowMapShader() : base(ShaderFilename) { if (BaseGame.CanUsePS20) // We use R32F, etc. and have a lot of precision compareDepthBias = 0.0001f; else // A8R8G8B8 isn't very precise, increase comparing depth bias compareDepthBias = 0.0075f;// 0.025f; // Ok, time to create the shadow map render target shadowMapTexture = new RenderToTexture( RenderToTexture.SizeType.ShadowMap); CalcShadowMapBiasMatrix(); shadowMapBlur = new ShadowMapBlur(); }