Using full screen quad texture to blur a point.

Started by
1 comment, last by emt 11 years, 2 months ago

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.

Advertisement

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

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

This topic is closed to new replies.

Advertisement