Jump to content
  • Advertisement
Sign in to follow this  
TimothyFarrar

Shader Model 4.0, Bilinear Vertex Texture Fetch?

This topic is 3918 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

Quick dumb question, but I cannot seem to get google to answer this one, With Shader Model 4.0, if your texture is setup for bilinear filtering, does reading from this texture in a vertex shader return a bilinear filtered result? Or do you have to manually bilinear filter like in SM3.0?

Share this post


Link to post
Share on other sites
Advertisement
Im pretty sure (but not positive) that any kind of texture fetching call (or most any other math call) can be used in any of the shaders (vertex, geometry and pixel) and should all work the same way; im pretty sure that it will filter correctly in the vertex shader as you would expect (but again not positive)

Share this post


Link to post
Share on other sites
Yes, you should be okay for bilinear filtering on VTF. It's still optional to have filtering for the FP32 formats and if you force a mip level (e.g. SampleLevel()) then you can only get isotropic filtering...

hth
Jack

Share this post


Link to post
Share on other sites
I believe you can also get anisotropic filtering with the derivative texture instructions, although I can't think of a relevant application off the top of my head... maybe some type of view-dependent LOD?

[Edited by - AndyTX on September 26, 2007 7:34:25 PM]

Share this post


Link to post
Share on other sites
I thought derivatives were definately out for vertex/geometry shaders. How would a vertex shader have a screen space partial derivative before you know where the vertex is on screen?

Share this post


Link to post
Share on other sites
ahhh.. I think I misunderstood. You meant you could use the texturing instructions but not the derivative instructions. So if you could come up with some meaningful derivative then you could use it.. Makes sense, although yeah I can't think of a use of it off the top of my head

Share this post


Link to post
Share on other sites
Quote:
Original post by WizardOfOzzz
ahhh.. I think I misunderstood. You meant you could use the texturing instructions but not the derivative instructions. So if you could come up with some meaningful derivative then you could use it.. Makes sense, although yeah I can't think of a use of it off the top of my head

Yeah exactly: the texture functions that take explicit derivatives. Naturally implicit derivatives are a bit meaningless... I guess technically you could work out a single derivative with respect to the input index stream? Seems pretty useless :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!