Shaders: Use uniforms for xBR parameters
Jeffrey Pfau jeffrey@endrift.com
Sat, 23 Jan 2016 20:52:26 -0800
2 files changed,
32 insertions(+),
4 deletions(-)
M
res/shaders/xbr.shader/manifest.ini
→
res/shaders/xbr.shader/manifest.ini
@@ -8,3 +8,31 @@ [pass.0]
integerScaling=1 vertexShader=xbr.vs fragmentShader=xbr.fs + +[pass.0.uniform.XBR_Y_WEIGHT] +type=float +default=48 +readableName=Y Weight +min=0 +max=100 + +[pass.0.uniform.XBR_EQ_THRESHOLD] +type=float +readableName=Eq Threshold +default=10.0 +min=0.0 +max=50.0 + +[pass.0.uniform.XBR_EQ_THRESHOLD2] +type=float +readableName=Eq Threshold2 +default=2.0 +min=0.0 +max=4.0 + +[pass.0.uniform.XBR_LV2_COEFFICIENT] +type=float +readableName=Lv2 Coefficient +default=2.0 +min=1.0 +max=3.0
M
res/shaders/xbr.shader/xbr.fs
→
res/shaders/xbr.shader/xbr.fs
@@ -25,10 +25,10 @@
Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. */ -#define XBR_Y_WEIGHT 48.0 -#define XBR_EQ_THRESHOLD 10.0 -#define XBR_EQ_THRESHOLD2 2.0 -#define XBR_LV2_COEFFICIENT 2.0 +uniform float XBR_Y_WEIGHT; +uniform float XBR_EQ_THRESHOLD; +uniform float XBR_EQ_THRESHOLD2; +uniform float XBR_LV2_COEFFICIENT; const mat3 yuv = mat3(0.299, 0.587, 0.114, -0.169, -0.331, 0.499, 0.499, -0.418, -0.0813); const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4);