Advertisement Jump to content
Sign in to follow this  

Texture coordinates in pixel shader

This topic is 4914 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 been reading the book of Shader X . There is an example in image processing, where they did a Cross Gradient Filter and another where they did sobel filter (pag 263 and 264). ps.1.4 def c0, 0.3f 0.59f, 0.11f, 1.0f texld r0 t0 texld r1 t1 //down right texld r2 t2 //down left ...... Can someone told me, how they get to put the good coordenates in t1 and t2 ??? Which is the format of t2 registers, quad-floats?? Is it possible only to get the values of the coordonates ? I think, pixel shader is iterated...every time for each pixel given by the rasterizer, but i-m not sure. Can someone told me if I am wrong?? I-m trying to have a object 2D and rotate it. Since I rotated, the coordonates will be fractions. So I would like to do an interpolation of the 4 texture values around my new coordonates. Any help will be really useful. Thanks, Jesus

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!