Sign in to follow this  
emt

Using full screen quad texture to blur a point.

Recommended Posts

emt    134

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.

 

Share this post


Link to post
Share on other sites
Ashaman73    13715

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

Share this post


Link to post
Share on other sites
emt    134

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

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