Jump to content

  • Log In with Google      Sign In   
  • Create Account


Using full screen quad texture to blur a point.


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
2 replies to this topic

#1 emt   Members   -  Reputation: 134

Like
0Likes
Like

Posted 15 February 2013 - 06:52 AM

Using the full screen quad texture to blur a point. Everything is fine except the final output comes a bit shifted horizontally. Logically using same thing for vertical and horizontal blurring, but do not know why this shift is there. For all texture coordinates I am using "texCoord = Input.Position*0.5 + 0.5". Final output scenario can be better understood by this image.

 

blurShift.jpg

 

Regards.

 



Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 6753

Like
1Likes
Like

Posted 15 February 2013 - 07:13 AM

Can you show off your code ?

 

You need to take care when accessing the texture to shift the texture coordinate by half pixel:

x = x +  0.5/texture_width

y = y + 0.5/texture_height



#3 emt   Members   -  Reputation: 134

Like
0Likes
Like

Posted 16 February 2013 - 11:18 AM

Can you show off your code ?

 

You need to take care when accessing the texture to shift the texture coordinate by half pixel:

x = x +  0.5/texture_width

y = y + 0.5/texture_height

Understood your point and made respective changes, got the correct output.

Thanks






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