From 4f3328edb3a17e8ed550aebf1c9bec1be1cf2ca8 Mon Sep 17 00:00:00 2001 From: Bruno Croci Date: Tue, 22 Feb 2022 04:41:28 +0100 Subject: [PATCH] Added `textureCube` macro for GLSL >= 130. (#2728) `textureCube` requires extension `GL_NV_shadow_samplers_cube`, however `texture` can sample a cube sampler without the extension. --- src/bgfx_shader.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bgfx_shader.sh b/src/bgfx_shader.sh index b28ec90e6..68fb23742 100644 --- a/src/bgfx_shader.sh +++ b/src/bgfx_shader.sh @@ -608,6 +608,7 @@ vec4 mod(vec4 _a, vec4 _b) { return _a - _b * floor(_a / _b); } # define texture2D(_sampler, _coord) texture(_sampler, _coord) # define texture2DArray(_sampler, _coord) texture(_sampler, _coord) # define texture3D(_sampler, _coord) texture(_sampler, _coord) +# define textureCube(_sampler, _coord) texture(_sampler, _coord) # define texture2DLod(_sampler, _coord, _lod) textureLod(_sampler, _coord, _lod) # define texture2DLodOffset(_sampler, _coord, _lod, _offset) textureLodOffset(_sampler, _coord, _lod, _offset) # endif // BGFX_SHADER_LANGUAGE_GLSL >= 130