Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Using full screen quad texture to blur a point.


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   -  Reputation: 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.

 



Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7793

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



#3 emt   Members   -  Reputation: 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.



PARTNERS