google / google/shaderc

Is glsl 330 actually supported ?

Open
#1,378 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
445
Avg merge
11h 6m
Merged PRs (30d)
6

Description

I've been trying to compile some very simple glsl 330 using glslc to spirv

```glsl
#version 330
layout(location = 0) in vec3 pos;
uniform mat4 uModelTransform;

void main()
{
gl_Position = uModelTransform * vec4(pos * 0.001, 1.0);
}
```

this resulted in the error `'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan`
because of it I tried the modification
```glsl
#version 330
layout(location = 0) in vec3 pos;
layout (set = 0,binding=0) uniform uModel {mat4 uModelTransform;};

void main()
{
gl_Position = uModelTransform * vec4(pos * 0.001, 1.0);
}
```
thinking it would fix the issues, but I end up getting the error ` error: 'binding' : not supported for this version or the enabled extensions`

like, at this point, is glsl 330 actually supported ? because it's basically just asking me to fully rewrite the shader for opengl 4.x, that's just not glsl 330

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.