mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-04 21:31:11 -05:00
61 lines
1.1 KiB
Text
61 lines
1.1 KiB
Text
|
struct v2f {
|
||
|
vec4 vertex;
|
||
|
vec2 texcoord;
|
||
|
};
|
||
|
uniform sampler2D _UpTex;
|
||
|
uniform vec4 _Tint;
|
||
|
vec4 skybox_frag (
|
||
|
in v2f i_1,
|
||
|
in sampler2D smp_2
|
||
|
)
|
||
|
{
|
||
|
vec4 col_3;
|
||
|
vec4 tex_4;
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = texture2D (smp_2, i_1.texcoord);
|
||
|
vec4 tmpvar_6;
|
||
|
tmpvar_6 = tmpvar_5;
|
||
|
tex_4 = tmpvar_6;
|
||
|
vec3 tmpvar_7;
|
||
|
tmpvar_7 = ((tex_4.xyz + _Tint.xyz) - 0.5);
|
||
|
col_3.xyz = tmpvar_7.xyz.xyz;
|
||
|
float tmpvar_8;
|
||
|
tmpvar_8 = (tex_4.w * _Tint.w);
|
||
|
col_3.w = vec4(tmpvar_8).w;
|
||
|
return col_3;
|
||
|
}
|
||
|
|
||
|
vec4 frag (
|
||
|
in v2f i_9
|
||
|
)
|
||
|
{
|
||
|
vec4 tmpvar_10;
|
||
|
tmpvar_10 = skybox_frag (i_9, _UpTex);
|
||
|
return tmpvar_10;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
v2f xlt_i_11;
|
||
|
vec4 xl_retval_12;
|
||
|
vec4 tmpvar_13;
|
||
|
tmpvar_13 = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
xlt_i_11.vertex = tmpvar_13;
|
||
|
vec2 tmpvar_14;
|
||
|
tmpvar_14 = gl_TexCoord[0].xy;
|
||
|
vec2 tmpvar_15;
|
||
|
tmpvar_15 = tmpvar_14;
|
||
|
xlt_i_11.texcoord = tmpvar_15;
|
||
|
vec4 tmpvar_16;
|
||
|
tmpvar_16 = frag (xlt_i_11);
|
||
|
vec4 tmpvar_17;
|
||
|
tmpvar_17 = tmpvar_16;
|
||
|
xl_retval_12 = tmpvar_17;
|
||
|
vec4 tmpvar_18;
|
||
|
tmpvar_18 = xl_retval_12.xyzw;
|
||
|
vec4 tmpvar_19;
|
||
|
tmpvar_19 = tmpvar_18;
|
||
|
gl_FragData[0] = tmpvar_19;
|
||
|
}
|
||
|
|