Open HaronK opened 8 years ago
Looking into it...
I think the code itself is fine, but something odd is happening in glValidateProgram. I am going to see if I can get this running on my macbook, which has an AMD gpu.
I think I found a reason of the problem. After upgrading to Ubuntu 16.04 my Radeon drivers were removed so now I'm using default ones. And also looks like it supports only OpenGL 3.3. This post says that OpenGL 3.3 doesn't support using samplers of different types in one shader. In the GenerateVolume.c and GenerateVolumeEnt.c shaders you are mixing sampler3D and sampler2D uniforms. So that's the reason. In the latest versions of OpenGL there is no such a restriction and everything works good. I don't think it will be possible to fix these shaders so I'm going to see how to update my drivers.
The shader is marked as "#version 120" (OpenGL 2.1) which IIRC still uses the distinction of sampler2D and sampler3D, but I could be wrong there (at the very least, it did not complain about this on nvidia hardware)
During lunching a program I'm getting error:
Error validating shader 129
After adding a bit more logging I have:
Init shader: ../src/glsl/GenerateVolume.c
Error validating shader: 129 Details: active samplers with a different type refer to the same texture image unit
My video card:
$ lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850 / R7 265 / R9 270 1024SP]