Jump to content

  • Log In with Google      Sign In   
  • Create Account

geometry shader sampling problem?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 the dodger uk   Members   -  Reputation: 148

Like
0Likes
Like

Posted 18 March 2013 - 08:36 AM

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 

 



Sponsor:

#2 MajorTom   Members   -  Reputation: 715

Like
0Likes
Like

Posted 18 March 2013 - 12:18 PM

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, 18 March 2013 - 04:02 PM.

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS