diff options
Diffstat (limited to '3rdparty/bgfx/examples/common/shaderlib.sh')
-rw-r--r-- | 3rdparty/bgfx/examples/common/shaderlib.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/3rdparty/bgfx/examples/common/shaderlib.sh b/3rdparty/bgfx/examples/common/shaderlib.sh index 5871aaf5cac..a890edba368 100644 --- a/3rdparty/bgfx/examples/common/shaderlib.sh +++ b/3rdparty/bgfx/examples/common/shaderlib.sh @@ -383,4 +383,13 @@ vec3 fixCubeLookup(vec3 _v, float _lod, float _topLevelCubeSize) return _v; } +vec2 texture2DBc5(sampler2D _sampler, vec2 _uv) +{ +#if BGFX_SHADER_LANGUAGE_HLSL && BGFX_SHADER_LANGUAGE_HLSL <= 3 + return texture2D(_sampler, _uv).yx; +#else + return texture2D(_sampler, _uv).xy; +#endif +} + #endif // __SHADERLIB_SH__ |