Could not find uniform:cascadeFarPlanes[2]
mjbmon opened this issue · 4 comments
I have been building the codes one at a time and I am up to chapter 26, 27.1, etc.
The code is throwing an exception "Could not find uniform:cascadeFarPlanes[2]", which means that it is unable to get the uniform location of cascadeFarPlanes[2]. I put in a little debugging and it gets all of the previous uniform locations for everything up to cascadeFarPlanes[2] (e.g. cascadeFarPlanes[0], [1])
Any ideas? The normal limit for the number of uniform locations in OpenGL is 1024.
My system is a modern laptop running Linux Mint 20.1 and I cloned the book git repository just a few days ago. Also am using Java 11, with lwjgl also very recent.
The example is working for me. You have mentioned that you have cloned the samples, have you modified the shaders? Have you checked the value of NUM_CASCADES
constant?
If you are getting a -1 something is not working properly, it will not work in the shader. I will try to check this in a Linux VM.
I've tried to setup a VM but the OpenGL drivers do not support the required version. Since I'm refactoring the source code, I will try to setup an example compatible with OpenGL version that I have to test arrays uniforms in shaders.