私はWindows上でLunarGバルカンSDK 1.0.37.0を使用して、次のシェーダーをコンパイルしようとしている:OpenGL 4.5のSPIR-Vシェーダで、バインドレステクスチャを使用することはできますか?
#version 450 core
#extension GL_ARB_bindless_texture : require
layout(std140, binding=1) uniform LightUbo
{
vec3 lightDirectionVS;
};
layout(std140, binding=2) uniform TextureUBO
{
sampler2D samplers[ 10 ];
};
in vec2 vUV;
in vec3 vNormalVS;
out vec4 fragColor;
void main()
{
vec2 uv = vUV;
uv.y = 1.0 - uv.y;
fragColor = texture(samplers[ 0 ], uv) * max(0.2, dot(lightDirectionVS, vNormalVS));
}
は、コマンドをコンパイルします。
\VulkanSDK\1.0.37.0\Bin\glslangValidator.exe -V assets\shader.frag -o assets\shader.frag.spv
コンパイラは、次のような出力が得られます。
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
ERROR: assets\shader.frag:2: '#extension' : extension not supported: GL_ARB_bindless_texture
ERROR: assets\shader.frag:2: '#extension' : extra tokens -- expected newline ERROR: assets\shader.frag:2: '' : compilation terminated
OpenGL 4.5およびSPIR-Vシェーダでのバインドレステクスチャを使用する方法はありますか?