Sign in to follow this  
Shinpou

glReadPixel selection + driver forced anti-aliasing

Recommended Posts

Shinpou    140
Hey all :) Ok so I made selection to my pet game project using color picking. However, I got some extremely weird behaviour, when I would have two quads very close to eachother and slightly to the distance - when I would move my mouse to the intersection of these two quads, glReadPixel would return something of an average value of these two. Now, I disabled everything for the time I render the colored quads, but frankly never got around the error, till I thought - what if the driver is forcing anti-aliasing. And it did indeed, and thus the inaccuracy is now gone. (Aka. I had enabled 2x anti-aliasing from the driver settings to be forced) That problem being fixed, it still remains a problem, that my game will not work if someone enables forced AA. Question thus is, what can I do to not let the forced AA happen? Best regards, Lari

Share this post


Link to post
Share on other sites
Yann L    1802
Quote:
Original post by Shinpou
That problem being fixed, it still remains a problem, that my game will not work if someone enables forced AA. Question thus is, what can I do to not let the forced AA happen?

Render your selection buffer to an FBO. Forced AA will not apply to FBOs, it has to be specifically enabled for them.

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