geometry shader sampling problem?

Started by
0 comments, last by Pthalicus 11 years, 1 month ago

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

Advertisement

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()

Saving the world, one semi-colon at a time.

This topic is closed to new replies.

Advertisement