Skip to content

Conversation

johnhaddon
Copy link
Member

This should fix the regressions caused by #400.

We really needed a test like this along with 5ef1dcf.
This fixes the problems introduced by 5ef1dcf.

The issue is that IECoreGL::PointsPrimitive overrides shaderSetup() in order to tinker with the vertex shader to perform fast instanced rendering of disks, spheres and quads. Because we do want to allow users to provide their own vertex shaders if they wish, the PointsPrimitive makes the assumption that if a vertex source has been specified explicitly, that the user knows what they're doing and will take care of the instancing too. This interacted badly with the new flatConstant() shader that the Primitive was using to override wireframe shading - because that shader was explicitly specifying a vertex source.

The solution is simple - use the default vertex source in flatConstant(), and grab the uniformCs variable directly in the fragment source. I should have thought of it in the first place.
andrewkaufman added a commit that referenced this pull request Mar 4, 2015
@andrewkaufman andrewkaufman merged commit f542aed into ImageEngine:master Mar 4, 2015
@johnhaddon johnhaddon deleted the glFixes branch March 11, 2015 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants