summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/shaders')
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_chroma.sc9
-rw-r--r--src/osd/modules/render/bgfx/shaders/makefile26
-rw-r--r--src/osd/modules/render/bgfx/shaders/shader.mk8
3 files changed, 27 insertions, 16 deletions
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_chroma.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_chroma.sc
index 51bb14676d3..c0d8ba07ac7 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_chroma.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_chroma.sc
@@ -22,11 +22,20 @@ void main()
vec4 cin = texture2D(s_tex, v_texcoord0);
vec4 cout = vec4(0.0, 0.0, 0.0, cin.a);
mat3 xy = mat3(u_chroma_a.xyz, u_chroma_b.xyz, u_chroma_c.xyz);
+
+#ifdef TRANSPOSED_XYZ_TO_sRGB
const mat3 XYZ_TO_sRGB = mat3(
3.2406, -0.9689, 0.0557,
-1.5372, 1.8758, -0.2040,
-0.4986, 0.0415, 1.0570
);
+#else
+ const mat3 XYZ_TO_sRGB = mat3(
+ 3.2406, -1.5372, -0.4986,
+ -0.9689, 1.8758, 0.0415,
+ 0.0557, -0.2040, 1.0570
+ );
+#endif
for (int i = 0; i < 3; ++i) {
float Y = u_y_gain[i] * cin[i];
diff --git a/src/osd/modules/render/bgfx/shaders/makefile b/src/osd/modules/render/bgfx/shaders/makefile
index 1ca45471b9b..7a058e7810f 100644
--- a/src/osd/modules/render/bgfx/shaders/makefile
+++ b/src/osd/modules/render/bgfx/shaders/makefile
@@ -15,22 +15,24 @@ endif
$(SUBDIRS):
@echo $@
ifeq ($(OS),windows)
- @make -s --no-print-directory TARGET=0 SHADERS_DIR=$@/ clean all
- @make -s --no-print-directory TARGET=1 SHADERS_DIR=$@/ clean all
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=0 SHADERS_DIR=$@/ clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=1 SHADERS_DIR=$@/ clean all SILENT="$(SILENT)"
endif
- @make -s --no-print-directory TARGET=2 SHADERS_DIR=$@/ clean all
- @make -s --no-print-directory TARGET=3 SHADERS_DIR=$@/ clean all
- @make -s --no-print-directory TARGET=4 SHADERS_DIR=$@/ clean all
- @make -s --no-print-directory TARGET=5 SHADERS_DIR=$@/ clean all
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=2 SHADERS_DIR=$@/ clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=3 SHADERS_DIR=$@/ clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=4 SHADERS_DIR=$@/ clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=5 SHADERS_DIR=$@/ clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=7 SHADERS_DIR=$@/ clean all SILENT="$(SILENT)"
main:
ifeq ($(OS),windows)
- @make -s --no-print-directory TARGET=0 clean all
- @make -s --no-print-directory TARGET=1 clean all
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=0 clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=1 clean all SILENT="$(SILENT)"
endif
- @make -s --no-print-directory TARGET=2 clean all
- @make -s --no-print-directory TARGET=3 clean all
- @make -s --no-print-directory TARGET=4 clean all
- @make -s --no-print-directory TARGET=5 clean all
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=2 clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=3 clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=4 clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=5 clean all SILENT="$(SILENT)"
+ $(SILENT) $(MAKE) -s --no-print-directory TARGET=7 clean all SILENT="$(SILENT)"
.PHONY: main rebuild $(SUBDIRS)
diff --git a/src/osd/modules/render/bgfx/shaders/shader.mk b/src/osd/modules/render/bgfx/shaders/shader.mk
index e7db3cdc242..b9cf2f47cef 100644
--- a/src/osd/modules/render/bgfx/shaders/shader.mk
+++ b/src/osd/modules/render/bgfx/shaders/shader.mk
@@ -43,24 +43,24 @@ SHADER_PATH=shaders/dx11/$(SHADERS_DIR)
else
ifeq ($(TARGET), 2)
VS_FLAGS=--platform nacl
-FS_FLAGS=--platform nacl
+FS_FLAGS=--platform nacl --define TRANSPOSED_XYZ_TO_sRGB
SHADER_PATH=shaders/essl/$(SHADERS_DIR)
else
ifeq ($(TARGET), 3)
VS_FLAGS=--platform android
-FS_FLAGS=--platform android
+FS_FLAGS=--platform android --define TRANSPOSED_XYZ_TO_sRGB
CS_FLAGS=--platform android
SHADER_PATH=shaders/essl/$(SHADERS_DIR)
else
ifeq ($(TARGET), 4)
VS_FLAGS=--platform linux -p 120
-FS_FLAGS=--platform linux -p 120
+FS_FLAGS=--platform linux -p 120 --define TRANSPOSED_XYZ_TO_sRGB
CS_FLAGS=--platform linux -p 430
SHADER_PATH=shaders/glsl/$(SHADERS_DIR)
else
ifeq ($(TARGET), 5)
VS_FLAGS=--platform osx -p metal
-FS_FLAGS=--platform osx -p metal
+FS_FLAGS=--platform osx -p metal --define TRANSPOSED_XYZ_TO_sRGB
CS_FLAGS=--platform osx -p metal
SHADER_PATH=shaders/metal/$(SHADERS_DIR)
else