summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/shaderlib.sh
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2017-12-01 13:22:27 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2017-12-01 13:22:27 +0100
commit39176274946d70ff520f265dee8fbd16d5fe0000 (patch)
tree318801d93146752050c9a492654ae3738820e3b9 /3rdparty/bgfx/examples/common/shaderlib.sh
parent6829ecb3b037d6bfbe0b84e818d17d712f71bce6 (diff)
Updated GENie, BGFX, BX, added BIMG since it is separated now, updated all shader binaries and MAME part of code to support new interfaces [Miodrag Milanovic]
Diffstat (limited to '3rdparty/bgfx/examples/common/shaderlib.sh')
-rw-r--r--3rdparty/bgfx/examples/common/shaderlib.sh9
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__