mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 01:11:32 +11:00
fix lottes-fast on d3d10/11/12 and increase blendoverlay max parameter sizes
This commit is contained in:
parent
f8459caaf1
commit
7e796317de
|
@ -154,7 +154,7 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||||
// Don't do this in your code
|
// Don't do this in your code
|
||||||
float FromSrgb1(float c){
|
float FromSrgb1(float c){
|
||||||
return (c<=0.04045)?c*(1.0/12.92):
|
return (c<=0.04045)?c*(1.0/12.92):
|
||||||
pow(c*(1.0/1.055)+(0.055/1.055),params.CRT_GAMMA);}
|
pow(abs(c)*(1.0/1.055)+(0.055/1.055),params.CRT_GAMMA);}
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
vec3 FromSrgb(vec3 c){return vec3(
|
vec3 FromSrgb(vec3 c){return vec3(
|
||||||
FromSrgb1(c.r),FromSrgb1(c.g),FromSrgb1(c.b));}
|
FromSrgb1(c.r),FromSrgb1(c.g),FromSrgb1(c.b));}
|
||||||
|
@ -363,7 +363,7 @@ vec3 CrtsFetch(vec2 uv){
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
if(params.MASK == 1.0){
|
else if(params.MASK == 1.0){
|
||||||
CrtsF3 m=CrtsF3(1.0,1.0,1.0);
|
CrtsF3 m=CrtsF3(1.0,1.0,1.0);
|
||||||
CrtsF1 x=CrtsFractF1(pos.x*(1.0/3.0));
|
CrtsF1 x=CrtsFractF1(pos.x*(1.0/3.0));
|
||||||
if(x<(1.0/3.0))m.r=dark;
|
if(x<(1.0/3.0))m.r=dark;
|
||||||
|
@ -372,11 +372,7 @@ vec3 CrtsFetch(vec2 uv){
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
if(params.MASK == 0.0){
|
else if(params.MASK == 3.0){
|
||||||
return CrtsF3(1.0,1.0,1.0);
|
|
||||||
}
|
|
||||||
//--------------------------------------------------------------
|
|
||||||
if(params.MASK == 3.0){
|
|
||||||
pos.x+=pos.y*2.9999;
|
pos.x+=pos.y*2.9999;
|
||||||
CrtsF3 m=CrtsF3(dark,dark,dark);
|
CrtsF3 m=CrtsF3(dark,dark,dark);
|
||||||
CrtsF1 x=CrtsFractF1(pos.x*(1.0/6.0));
|
CrtsF1 x=CrtsFractF1(pos.x*(1.0/6.0));
|
||||||
|
@ -385,6 +381,10 @@ vec3 CrtsFetch(vec2 uv){
|
||||||
else m.b=1.0;
|
else m.b=1.0;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
else{
|
||||||
|
return CrtsF3(1.0,1.0,1.0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//_____________________________/\_______________________________
|
//_____________________________/\_______________________________
|
||||||
//==============================================================
|
//==============================================================
|
||||||
|
|
|
@ -16,8 +16,8 @@ layout(push_constant) uniform Push
|
||||||
} params;
|
} params;
|
||||||
|
|
||||||
#pragma parameter OverlayMix "Overlay Mix" 1.0 0.0 1.0 0.05
|
#pragma parameter OverlayMix "Overlay Mix" 1.0 0.0 1.0 0.05
|
||||||
#pragma parameter LUTWidth "LUT Width" 6.0 1.0 30.0 1.0
|
#pragma parameter LUTWidth "LUT Width" 6.0 1.0 1920.0 1.0
|
||||||
#pragma parameter LUTHeight "LUT Height" 4.0 1.0 30.0 1.0
|
#pragma parameter LUTHeight "LUT Height" 4.0 1.0 1920.0 1.0
|
||||||
|
|
||||||
#define OverlayMix params.OverlayMix
|
#define OverlayMix params.OverlayMix
|
||||||
#define LUTWidth params.LUTWidth
|
#define LUTWidth params.LUTWidth
|
||||||
|
|
Loading…
Reference in a new issue