Shaders: Use uniforms for xBR parameters

This commit is contained in:
Jeffrey Pfau 2016-01-23 20:52:26 -08:00
parent 181174c810
commit e5f2dcb5ab
2 changed files with 32 additions and 4 deletions

View File

@ -8,3 +8,31 @@ passes=1
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

View File

@ -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);