Content-Disposition: inline; filename="f3fb60fee6fb83c80e776fcfd1bd271dc83d126f..75466ad87d2af99d05b0c5b84e661523734d710b.patch" Last-Modified: Thu, 01 May 2025 16:12:23 GMT Expires: Sun, 29 Apr 2035 16:12:23 GMT From 75466ad87d2af99d05b0c5b84e661523734d710b Mon Sep 17 00:00:00 2001 From: cgwg Date: Thu, 7 Jul 2022 10:15:55 +0100 Subject: bgfx: crt-geom and crt-geom-deluxe improvements: (#8653) * crt-geom-deluxe: Increased number of taps for halation and increased maximum width. * crt-geom*: Moved repeated crt-geom/crt-geom-deluxe functions into their own file. * crt-geom and crt-geom-deluxe: added support for sRGB output gamma ramp and made it the default. --- bgfx/chains/crt-geom-deluxe.json | 15 +++++++++++++-- bgfx/chains/crt-geom.json | 13 ++++++++++++- bgfx/effects/crt-geom/crt-geom-deluxe.json | 1 + bgfx/effects/crt-geom/crt-geom.json | 1 + .../essl/chains/crt-geom/fs_crt-geom-deluxe.bin | Bin 17749 -> 18114 bytes bgfx/shaders/essl/chains/crt-geom/fs_crt-geom.bin | Bin 13852 -> 14279 bytes bgfx/shaders/essl/chains/crt-geom/fs_gaussx.bin | Bin 2097 -> 3787 bytes bgfx/shaders/essl/chains/crt-geom/fs_gaussy.bin | Bin 2097 -> 3787 bytes bgfx/shaders/essl/chains/crt-geom/vs_gaussx.bin | Bin 704 -> 832 bytes bgfx/shaders/essl/chains/crt-geom/vs_gaussy.bin | Bin 704 -> 832 bytes .../glsl/chains/crt-geom/fs_crt-geom-deluxe.bin | Bin 16997 -> 17343 bytes bgfx/shaders/glsl/chains/crt-geom/fs_crt-geom.bin | Bin 13196 -> 13604 bytes bgfx/shaders/glsl/chains/crt-geom/fs_gaussx.bin | Bin 2009 -> 3645 bytes bgfx/shaders/glsl/chains/crt-geom/fs_gaussy.bin | Bin 2009 -> 3645 bytes bgfx/shaders/glsl/chains/crt-geom/vs_gaussx.bin | Bin 644 -> 766 bytes bgfx/shaders/glsl/chains/crt-geom/vs_gaussy.bin | Bin 644 -> 766 bytes .../metal/chains/crt-geom/fs_crt-geom-deluxe.bin | Bin 15163 -> 15960 bytes bgfx/shaders/metal/chains/crt-geom/fs_crt-geom.bin | Bin 11796 -> 12535 bytes bgfx/shaders/metal/chains/crt-geom/fs_gaussx.bin | Bin 2143 -> 3485 bytes bgfx/shaders/metal/chains/crt-geom/fs_gaussy.bin | Bin 2143 -> 3485 bytes bgfx/shaders/metal/chains/crt-geom/vs_gaussx.bin | Bin 1063 -> 1227 bytes bgfx/shaders/metal/chains/crt-geom/vs_gaussy.bin | Bin 1063 -> 1227 bytes .../spirv/chains/crt-geom/fs_crt-geom-deluxe.bin | Bin 24150 -> 24660 bytes bgfx/shaders/spirv/chains/crt-geom/fs_crt-geom.bin | Bin 18545 -> 19259 bytes bgfx/shaders/spirv/chains/crt-geom/fs_gaussx.bin | Bin 4470 -> 7294 bytes bgfx/shaders/spirv/chains/crt-geom/fs_gaussy.bin | Bin 4486 -> 7310 bytes bgfx/shaders/spirv/chains/crt-geom/vs_gaussx.bin | Bin 1936 -> 2224 bytes bgfx/shaders/spirv/chains/crt-geom/vs_gaussy.bin | Bin 1952 -> 2240 bytes 28 files changed, 27 insertions(+), 3 deletions(-) (limited to 'bgfx') diff --git a/bgfx/chains/crt-geom-deluxe.json b/bgfx/chains/crt-geom-deluxe.json index 5e20b5f8aa4..cea592b5d67 100644 --- a/bgfx/chains/crt-geom-deluxe.json +++ b/bgfx/chains/crt-geom-deluxe.json @@ -133,7 +133,7 @@ "name": "blurwidth", "text": "Halation blur width", "default": 2.0, - "max" : 4.0, + "max" : 8.0, "min" : 0.1, "step" : 0.1, "format": "%1.1f", @@ -210,9 +210,19 @@ "step" : 0.05, "format": "%1.2f", "screen": "raster" }, + { "type": "intenum", + "name": "monitorsRGB", + "text": "Gamma of output display", + "default": 1, + "max" : 1, + "min" : 0, + "step" : 1, + "format": "%s", + "strings": [ "custom", "sRGB" ], + "screen": "raster" }, { "type": "float", "name": "monitorgamma", - "text": "Gamma of output display", + "text": " custom gamma", "default": 2.2, "max" : 4.0, "min" : 0.7, @@ -341,6 +351,7 @@ { "uniform": "overscan", "slider": "overscan" }, { "uniform": "aspect", "slider": "aspect" }, { "uniform": "CRTgamma", "slider": "CRTgamma" }, + { "uniform": "monitorsRGB", "slider": "monitorsRGB" }, { "uniform": "monitorgamma","slider": "monitorgamma" }, { "uniform": "aperture_strength","slider": "aperture_strength" }, { "uniform": "aperture_brightboost","slider": "aperture_brightboost" }, diff --git a/bgfx/chains/crt-geom.json b/bgfx/chains/crt-geom.json index f34d059800d..8e9c7af37ed 100644 --- a/bgfx/chains/crt-geom.json +++ b/bgfx/chains/crt-geom.json @@ -129,9 +129,19 @@ "step" : 0.05, "format": "%1.2f", "screen": "raster" }, + { "type": "intenum", + "name": "monitorsRGB", + "text": "Gamma of output display", + "default": 1, + "max" : 1, + "min" : 0, + "step" : 1, + "format": "%s", + "strings": [ "custom", "sRGB" ], + "screen": "raster" }, { "type": "float", "name": "monitorgamma", - "text": "Gamma of output display", + "text": " custom gamma", "default": 2.2, "max" : 4.0, "min" : 0.7, @@ -165,6 +175,7 @@ { "uniform": "overscan", "slider": "overscan" }, { "uniform": "aspect", "slider": "aspect" }, { "uniform": "CRTgamma", "slider": "CRTgamma" }, + { "uniform": "monitorsRGB", "slider": "monitorsRGB" }, { "uniform": "monitorgamma","slider": "monitorgamma" }, { "uniform": "aperture_strength", "slider": "aperture_strength" }, { "uniform": "aperture_brightboost","slider": "aperture_brightboost" }, diff --git a/bgfx/effects/crt-geom/crt-geom-deluxe.json b/bgfx/effects/crt-geom/crt-geom-deluxe.json index 500eab09542..08e4f2714c1 100644 --- a/bgfx/effects/crt-geom/crt-geom-deluxe.json +++ b/bgfx/effects/crt-geom/crt-geom-deluxe.json @@ -30,6 +30,7 @@ { "name": "mipmap_texture", "type": "int", "values": [ 3 ] }, { "name": "curvature", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, { "name": "CRTgamma", "type": "vec4", "values": [ 2.4, 0.0, 0.0, 0.0 ] }, + { "name": "monitorsRGB", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, { "name": "monitorgamma", "type": "vec4", "values": [ 2.2, 0.0, 0.0, 0.0 ] }, { "name": "overscan", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, { "name": "aspect", "type": "vec4", "values": [ 1.0, 0.75,0.0, 0.0 ] }, diff --git a/bgfx/effects/crt-geom/crt-geom.json b/bgfx/effects/crt-geom/crt-geom.json index b742896485e..e51f071495e 100644 --- a/bgfx/effects/crt-geom/crt-geom.json +++ b/bgfx/effects/crt-geom/crt-geom.json @@ -28,6 +28,7 @@ { "name": "mask_texture", "type": "int", "values": [ 1 ] }, { "name": "curvature", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, { "name": "CRTgamma", "type": "vec4", "values": [ 2.4, 0.0, 0.0, 0.0 ] }, + { "name": "monitorsRGB", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, { "name": "monitorgamma", "type": "vec4", "values": [ 2.2, 0.0, 0.0, 0.0 ] }, { "name": "overscan", "type": "ve
<?xml version="1.0"?>
<mamelayout version="2">

<!-- define elements -->

	<!-- not really black, and not really leds either, but let's just keep the same naming as the other hh test layouts -->
	<element name="static_black"><rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect></element>

	<element name="led" defstate="0">
		<disk state="0"><color red="0.5412" green="0.57255" blue="0.5804" /></disk>
		<disk state="1"><color red="0.361" green="0.326" blue="0.346" /></disk>
	</element>


<!-- build screen -->

	<view name="Test Layout">
		<bounds left="0" right="10" top="0" bottom="10" />
		<bezel element="static_black">
			<bounds left="0" right="10" top="0" bottom="10" />
		</bezel>

	<!-- max 9*4*2 matrix -->

		<repeat count="9">
			<param name="y" start="0" increment="1" />

			<!-- h1 -->
			<repeat count="4">
				<param name="x" start="0" increment="1" />
				<param name="p" start="0" increment="1" />
				<bezel name="~y~.~x~.0" element="led"><bounds x="~p~" y="~y~" width="0.5" height="0.5" /></bezel>
			</repeat>

			<!-- h2 -->
			<repeat count="4">
				<param name="x" start="0" increment="1" />
				<param name="p" start="5" increment="1" />
				<bezel name="~y~.~x~.1" element="led"><bounds x="~p~" y="~y~" width="0.5" height="0.5" /></bezel>
			</repeat>
		</repeat>

	</view>
</mamelayout>