[Bf-viewport] OpenGL refactoring tasks

Mike Erwin significant.bit at gmail.com
Fri Dec 11 22:24:33 CET 2015


>
> Mike Erwin <significant.bit at gmail.com> wrote:
> > For the GL_FLAT task do you mean the screen space derivatives in fragment
> > stage? I think it's better handled earlier in the pipeline, by using flat
> > interpolation and per-primitive normals. There needs to be some agreement
> > between a flat shader and the mesh data feeding it to get the right
> results.



> Brecht Van Lommel <brechtvanlommel at pandora.be> wrote:
> I think that if we can handle it in the fragment shader with
> derivatives, that would be the simplest solution? What would be the
> benefit of handling it earlier in the pipeline?


More efficient, better results, and matches old glShadeModel behavior.

If the caller knows it wants flat shading, it can specify the flat version
of the shader then feed data differently.

Or what you're saying: specify flat version of shader and feed the *same*
data to it. Handle it in the shader.

Dammit, did I just volunteer for the GL_FLAT task? :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-viewport/attachments/20151211/6d04a5f4/attachment.htm 


More information about the Bf-viewport mailing list