mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-12 01:01:30 -05:00
24 lines
699 B
Text
24 lines
699 B
Text
uniform vec4 _AdaptParams;
|
|
uniform sampler2D _CurTex;
|
|
uniform sampler2D _MainTex;
|
|
void main ()
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0].xy;
|
|
vec4 valNew_2;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_MainTex, tmpvar_1);
|
|
vec2 tmpvar_4;
|
|
tmpvar_4 = ((texture2D (_CurTex, tmpvar_1).xy - tmpvar_3.xy) * _AdaptParams.x);
|
|
valNew_2.xy = (tmpvar_3.xy + (sign(tmpvar_4) * max (vec2(0.00392157, 0.00392157),
|
|
abs(tmpvar_4)
|
|
)));
|
|
valNew_2.x = max (valNew_2.x, _AdaptParams.z);
|
|
valNew_2.y = min (valNew_2.y, _AdaptParams.y);
|
|
valNew_2.z = ((valNew_2.x - valNew_2.y) + 0.01);
|
|
valNew_2.w = (valNew_2.y / valNew_2.z);
|
|
gl_FragData[0] = valNew_2;
|
|
}
|
|
|
|
|
|
// inputs: 1, stats: 12 alu 2 tex 0 flow
|