bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-Hidden_Noise_Shader_RGB-ir.txt
2014-02-10 23:06:13 -08:00

75 lines
1.6 KiB
Text

struct v2f {
vec4 pos;
vec2 uv;
vec2 uvg;
vec2 uvs;
};
uniform sampler2D _GrainTex;
uniform vec4 _Intensity;
uniform sampler2D _MainTex;
uniform sampler2D _ScratchTex;
vec4 frag (
in v2f i_1
)
{
vec3 scratch_2;
vec3 grain_3;
vec4 col_4;
vec4 tmpvar_5;
tmpvar_5 = texture2D (_MainTex, i_1.uv);
vec4 tmpvar_6;
tmpvar_6 = tmpvar_5;
col_4 = tmpvar_6;
vec4 tmpvar_7;
tmpvar_7 = texture2D (_GrainTex, i_1.uvg);
vec3 tmpvar_8;
tmpvar_8 = ((tmpvar_7.xyz * 2.0) - 1.0);
grain_3 = tmpvar_8;
vec3 tmpvar_9;
tmpvar_9 = (col_4.xyz + (grain_3 * _Intensity.x));
col_4.xyz = tmpvar_9.xyz.xyz;
vec4 tmpvar_10;
tmpvar_10 = texture2D (_ScratchTex, i_1.uvs);
vec3 tmpvar_11;
tmpvar_11 = ((tmpvar_10.xyz * 2.0) - 1.0);
scratch_2 = tmpvar_11;
vec3 tmpvar_12;
tmpvar_12 = (col_4.xyz + (scratch_2 * _Intensity.y));
col_4.xyz = tmpvar_12.xyz.xyz;
return col_4;
}
void main ()
{
v2f xlt_i_13;
vec4 xl_retval_14;
vec4 tmpvar_15;
tmpvar_15 = vec4(0.0, 0.0, 0.0, 0.0);
xlt_i_13.pos = tmpvar_15;
vec2 tmpvar_16;
tmpvar_16 = gl_TexCoord[0].xy;
vec2 tmpvar_17;
tmpvar_17 = tmpvar_16;
xlt_i_13.uv = tmpvar_17;
vec2 tmpvar_18;
tmpvar_18 = gl_TexCoord[1].xy;
vec2 tmpvar_19;
tmpvar_19 = tmpvar_18;
xlt_i_13.uvg = tmpvar_19;
vec2 tmpvar_20;
tmpvar_20 = gl_TexCoord[2].xy;
vec2 tmpvar_21;
tmpvar_21 = tmpvar_20;
xlt_i_13.uvs = tmpvar_21;
vec4 tmpvar_22;
tmpvar_22 = frag (xlt_i_13);
vec4 tmpvar_23;
tmpvar_23 = tmpvar_22;
xl_retval_14 = tmpvar_23;
vec4 tmpvar_24;
tmpvar_24 = xl_retval_14.xyzw;
vec4 tmpvar_25;
tmpvar_25 = tmpvar_24;
gl_FragData[0] = tmpvar_25;
}