You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce number of varyings for line_sdf shader - #4542
The line_sdf shader currently uses a lot of varyings—too many for some OpenGL implementations. They fail to link the program with a message of Too many varyings. OpenGL ES 2.0 has a minimum value of 8 for GL_MAX_VARYING_VECTORS, while this shader uses 10 or 11.
I believe we could easily merge some of the individual float varyings into a vector.
The vertex shader gapwidth and offset varyings aren't even used by the fragment shader. To avoid this, the #pragma expander could be smarter and not generate varyings for attributes that are used only by the vertex shader.
Rather than introducing additional syntax, could the #pragma expander compare the set of pragmas in the vertex shader to the set in the fragment shader, and generate varyings only for attributes present in both?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
line_sdfshader currently uses a lot of varyings—too many for some OpenGL implementations. They fail to link the program with a message ofToo many varyings. OpenGL ES 2.0 has a minimum value of 8 forGL_MAX_VARYING_VECTORS, while this shader uses 10 or 11.I believe we could easily merge some of the individual
floatvaryings into a vector./cc @anandthakker