Sign in to follow this  
Followers 0
emt

Using full screen quad texture to blur a point.

2 posts in this topic

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.

 

[attachment=13640:blurShift.jpg]

 

Regards.

 

0

Share this post


Link to post
Share on other sites

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

1

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0