Jump to content

Image of the Day

Working on #steam achievements!
#screenshotsaturday #indiegame #pixelart #NadiaWasHere #RPG #indiedev https://t.co/IcDuJSWsGK
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Using full screen quad texture to blur a point.

4: Adsense

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   

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.

 



#2 Ashaman73   Members   

13702
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


Ashaman

 

Gnoblins: Website - Facebook - Twitter - Youtube - Steam Greenlit - IndieDB - Gamedev Log


#3 emt   Members   

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.