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

Compiler::get_shader_resources() does not return all uniforms #2189

Closed
hiteshbosamiya opened this issue Aug 25, 2023 · 1 comment
Closed

Comments

@hiteshbosamiya
Copy link
Contributor

I have the following uniforms in my fragment shader:

layout(location = 0) uniform mat4 u_model;
layout(location = 4) uniform mat4 u_view;
layout(location = 8) uniform mat4 u_projection;

There is no way to get the above uniforms using Compiler::get_shader_resources() method (the struct ShaderResources does not contain uniforms member). The ones which does not have base type SPIRType::Image, SPIRType::Sampler, SPIRType::SampledImage or SPIRType::AccelerationStructure are not getting collected, I think they should be collected as uniforms.

@hiteshbosamiya
Copy link
Contributor Author

hiteshbosamiya commented Aug 26, 2023

As per @HansKristian-Work, since the plain uniforms are supported only in legacy GL, we will use the name gl_plain_uniforms instead of uniforms. Created PR #2190.

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