mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
51 lines
925 B
Text
51 lines
925 B
Text
|
struct v2f {
|
||
|
vec4 vertex;
|
||
|
vec3 texcoord;
|
||
|
};
|
||
|
uniform vec4 _Tint;
|
||
|
uniform samplerCube _Tex;
|
||
|
vec4 frag (
|
||
|
in v2f i
|
||
|
)
|
||
|
{
|
||
|
vec4 col;
|
||
|
vec4 tex;
|
||
|
vec4 tmpvar_1;
|
||
|
tmpvar_1 = textureCube (_Tex, i.texcoord);
|
||
|
vec4 tmpvar_2;
|
||
|
tmpvar_2 = tmpvar_1;
|
||
|
tex = tmpvar_2;
|
||
|
vec3 tmpvar_3;
|
||
|
tmpvar_3 = ((tex.xyz + _Tint.xyz) - 0.5);
|
||
|
col.xyz = tmpvar_3.xyz.xyz;
|
||
|
float tmpvar_4;
|
||
|
tmpvar_4 = (tex.w * _Tint.w);
|
||
|
col.w = vec4(tmpvar_4).w;
|
||
|
return col;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
v2f xlt_i;
|
||
|
vec4 xl_retval;
|
||
|
vec4 tmpvar_1;
|
||
|
tmpvar_1 = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
xlt_i.vertex = tmpvar_1;
|
||
|
vec3 tmpvar_2;
|
||
|
tmpvar_2 = gl_TexCoord[0].xyz;
|
||
|
vec3 tmpvar_3;
|
||
|
tmpvar_3 = tmpvar_2;
|
||
|
xlt_i.texcoord = tmpvar_3;
|
||
|
vec4 tmpvar_4;
|
||
|
tmpvar_4 = frag (xlt_i);
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = tmpvar_4;
|
||
|
xl_retval = tmpvar_5;
|
||
|
vec4 tmpvar_6;
|
||
|
tmpvar_6 = xl_retval.xyzw;
|
||
|
vec4 tmpvar_7;
|
||
|
tmpvar_7 = tmpvar_6;
|
||
|
gl_FragData[0] = tmpvar_7;
|
||
|
}
|
||
|
|