mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
32 lines
1,003 B
Text
32 lines
1,003 B
Text
uniform sampler2D _BumpMap;
|
|
uniform sampler2D _ColorControl;
|
|
uniform vec4 _horizonColor;
|
|
void main ()
|
|
{
|
|
vec4 col_1;
|
|
vec4 normal_2;
|
|
normal_2.xy = ((texture2D (_BumpMap, gl_TexCoord[0].xy).wy * 2.0) - 1.0);
|
|
normal_2.z = sqrt(((1.0 -
|
|
(normal_2.x * normal_2.x)
|
|
) - (normal_2.y * normal_2.y)));
|
|
vec4 normal_3;
|
|
normal_3.xy = ((texture2D (_BumpMap, gl_TexCoord[1].xy).wy * 2.0) - 1.0);
|
|
normal_3.z = sqrt(((1.0 -
|
|
(normal_3.x * normal_3.x)
|
|
) - (normal_3.y * normal_3.y)));
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = texture2D (_ColorControl, vec2(dot (gl_TexCoord[2].xyz, ((normal_2.xyz + normal_3.xyz) * 0.5))));
|
|
col_1.xyz = mix (tmpvar_4.xyz, _horizonColor.xyz, tmpvar_4.www);
|
|
col_1.w = _horizonColor.w;
|
|
gl_FragData[0] = col_1;
|
|
}
|
|
|
|
|
|
// stats: 18 alu 3 tex 0 flow
|
|
// inputs: 1
|
|
// #0: gl_TexCoord (high float) 4x1 [3] loc 4
|
|
// uniforms: 1 (total size: 0)
|
|
// #0: _horizonColor (high float) 4x1 [-1]
|
|
// textures: 2
|
|
// #0: _BumpMap (high 2d) 0x0 [-1]
|
|
// #1: _ColorControl (high 2d) 0x0 [-1]
|