I'm still very inexperienced with shaders, but I am good at climbing the learning curve.
What I stumbled upon this morning is an attempt to use the uniform type in both fragmented and vertex shaders.
A uniform can be defined in both shaders, but access to it is possible only in one or the other shader, but not in both. If I try to access the shader in both cases, the program will not compile.
The last idea I used is that they are compiled as separate characters, but I donβt know how to access them except glGetUniformLocation. A call that returns the same uniform location twice with the same line ... doesn't help much.
Shaders are pretty simple, and everything works just fine, with the exception of single-line or non-tests, which do not affect rendering.
Is there a special approach for using the uniform uniform with the same value between two shaders?
source
share