opengl - How to deduce the triangle vertices in fragment shader -


if draw triangles using opengl, how deduce vertices each fragment? sending position vertex shader interpolates it, leading loss of information.

from geometry shader may access 3 vertices of triangle, may pass them fragment shader via in/out (aka varying) variables. prevent them interpolating, use flat interpolation qualifier.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

python 3.5 - Pyqtgraph string in x tick -