[font=courier new,courier,monospace]Am facing weird culling issue with My post processing shader. Right now, Post processing shader does nothing but draws the scene as it is on the screen space aligned quad with back buffer surface as a texture. [/font]
[font=courier new,courier,monospace]To my surprise, the real problem is with weird culling issue that is occuring only on the nvidia cards. Everything works fine when demo is run on ati cards. Attached is the screenshots for both the cards. I tried setting cullmode to all 3 modes both inside CPP code & in shader technique as well, but am unable to figure out real cause for the problem.[/font]
[font=courier new,courier,monospace]Attached is the basic shader code for post process setup. [/font][font=courier new,courier,monospace]
// Global Shader Variables
texture gScreenTexture;[/font]
[font=courier new,courier,monospace]// Samplers
sampler screenSampler = sampler_state
{
Texture = <gScreenTexture>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
AddressU = WRAP;
AddressV = WRAP;
};[/font]
[font=courier new,courier,monospace]/////////////////////////////////////////////////////////////////////[/font]
[font=courier new,courier,monospace]// The vertex shader does not do any transformation, coordinates
// are allready in clipping space.
VS_OUTPUT VS( float4 Pos:POSITION, float2 Tex:TEXCOORD0 )
{
VS_OUTPUT output = (VS_OUTPUT)0;
output.Pos=Pos;
output.Tex = Tex;
return output;
}[/font]
[font=courier new,courier,monospace]// Default
float4 PS(VS_OUTPUT pIn):COLOR0
{
float4 rgb = tex2D ( screenSampler, pIn.Tex);
return rgb;
}[/font]
[font=courier new,courier,monospace]/////////////////////////////////////////////////////////////////////
// tecnique name needs to correspond to the value passed
// to the GetTechniqueByName method
technique Default
{
pass p0
{
VertexShader = compile vs_3_0 VS();
PixelShader = compile ps_3_0 PS();
}
}
[/font][font=courier new,courier,monospace]I can be rest assured that setup required for the Post processing is done in the correct way using DirectX. Screenshots for all post processing effects achieved so far on ATI cards can be seen on this blog of mine : http://rupeshmandke.blogspot.in/[/font]
[font=courier new,courier,monospace]Any guidance will be much appreciated. [/font]
[font=courier new,courier,monospace]Thanks,[/font]
[font=courier new,courier,monospace]rmandke. [/font]