Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with shader GenerateVolume #10

Open
HaronK opened this issue Aug 4, 2016 · 4 comments
Open

Issue with shader GenerateVolume #10

HaronK opened this issue Aug 4, 2016 · 4 comments

Comments

@HaronK
Copy link

HaronK commented Aug 4, 2016

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]

@gavanw
Copy link
Owner

gavanw commented Aug 4, 2016

Looking into it...

@gavanw
Copy link
Owner

gavanw commented Aug 4, 2016

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.

@HaronK
Copy link
Author

HaronK commented Aug 6, 2016

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.

@gavanw
Copy link
Owner

gavanw commented Aug 6, 2016

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants