Sign in to follow this  
the dodger uk

geometry shader sampling problem?

Recommended Posts

the dodger uk    148

i have 2 two types sampling in my geometry shader but i just found out that  its does not work  

 

SamplerState gPointSample 

{
    Filter = MIN_MAG_MIP_POINT;
    AddressU = CLAMP;
};
 

SamplerState gPointSample 

{
    Filter   = MIN_MAG_MIP_LINEAR;
    AddressU = CLAMP;
};

 

 

after much checking it apears that  it does not uses linear sampling even if i use the  correct filterstate

 

is there something im missing 

 

Share this post


Link to post
Share on other sites
Pthalicus    738

I'm unsure of how the D3D shader compiler / effect system works when specifying just one address mode in the sampler state.

 

Here, you're just applying the CLAMP state to AddressU without setting AddressV or AddressW. 

Does the effect compiler output any warnings/errors?

 

Searching through MSDN I found this: http://msdn.microsoft.com/en-us/library/windows/desktop/bb509644(v=vs.85).aspx
Though this doesn't really answer that question, it does give an example in "MeshTextureSampler" for trilinear sampling.

 

(Also, I assume the duplicated "gPointSample" is a copy/paste error?)

 

Hope this helps

 

 

Additionally, since you're sampling in the geometry shader, ensure you're using the correct texture access method: http://msdn.microsoft.com/en-us/library/bb509700%28v=VS.85%29.aspx. I.e Load(), SampleGrad() or SampleLevel()

Edited by MajorTom

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this