有任何方法可以自动编译OpenGL着色器吗?问题是制服的问题。
'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
我已经尝试过编译OpenGL,然后用--vulkan-semantics进行螺旋交叉反编译,但它仍然有不透明的制服。
螺旋交叉似乎只有编译OpenGL的Vulkan着色器的工具。
[--glsl-emit-push-constant-as-ubo]
[--glsl-emit-ubo-as-plain-uniforms]
我开始读,我想用VsCode开发一些东西。
我安装了这些扩展:
GLSL皮棉
glsl-画布
色系GLSL线
支持VS代码的着色语言
glsl-文字
当我保存一个*.frag文件时,我得到:
GLSL Lint: config.glslangValidatorPath is empty, please set it to the executable
和
Shaderc Lint: config.glslcPath is empty, please set it to the executable
我读到我必须使用GLSLValidator设置路径,但我不明白如何设
我阅读了许多文章和帖子,内容涉及将向量和矩阵之类的值从顶点着色阶段传递到片段着色器。但我仍然不确定:如果在顶点着色器(我将称为vtxs)和片段着色器中的var中有一些out vars,那么OpenGl如何关联它们,使它们引用相同的值(我忽略了传递给frgs的值是内插的)?我必须按顺序把它们写下来吗?如果我写到: OpenGl是如何解释这些变量的:
vtxs:
out float x;
out vec4 mvp;
frgs:
in vec4 mvp;
in float x;
in double newvar;
注意:I对var类型进行了洗牌,frgs中的var比vtxs中的var多1。
我看到布