glReadPixel selection + driver forced anti-aliasing
3 replies to this topic
Members - Reputation: 140
Posted 05 May 2010 - 08:03 AM
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
Moderators - Reputation: 1794
Posted 05 May 2010 - 09:31 AM
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.