Skip to main content
GameDev.net gamedev.net
🔒 Locked

Using full screen quad texture to blur a point.

Started by emt Feb 15, 2013 at 12:52 PM 1 replies 1.6k views
Original Post
emt
emt

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.

Ashaman73
Ashaman73

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

emt
emt

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.