Sign in to follow this  

geometry shader sampling problem?

This topic is 1766 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

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
Sign in to follow this