displaz icon indicating copy to clipboard operation
displaz copied to clipboard

More flexible shader name matching

Open c42f opened this issue 9 years ago • 1 comments

The case of variable names can cause a mismatch between variables in the file and variables in the shader. This is a bit of an unnecessary pain, and it would be useful if we were a bit more flexible about how the matching worked. For robustness and flexibility the name matching could be a two stage process:

  1. Match names exactly if possible, including perfect case matching etc
  2. If no match is found, attempt to match by normalizing to all lowercase, (possibly also removing underscores, etc?)

c42f avatar Oct 07 '16 08:10 c42f

I would advise to abandon matching shader inputs to variable names with C++

This has been made obsolete with the layout qualifier https://www.khronos.org/opengl/wiki/Layout_Qualifier_(GLSL)

Since you've migrated to OpenGL 3.3 you can forego the use of most name-based-interface-matching