mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
32 lines
895 B
Text
32 lines
895 B
Text
|
#version 300 es
|
||
|
out lowp vec4 _fragData;
|
||
|
uniform sampler2D _MainTex;
|
||
|
uniform mediump vec4 _TerrainTreeLightColors[4];
|
||
|
in highp vec2 xlv_uv;
|
||
|
in mediump vec3 xlv_nl;
|
||
|
void main ()
|
||
|
{
|
||
|
lowp vec4 tmpvar_1;
|
||
|
mediump vec3 light_2;
|
||
|
lowp vec4 col_3;
|
||
|
col_3 = texture (_MainTex, xlv_uv);
|
||
|
light_2 = ((col_3.xyz * xlv_nl.x) * _TerrainTreeLightColors[0].xyz);
|
||
|
light_2 = (light_2 + ((col_3.xyz * xlv_nl.y) * _TerrainTreeLightColors[1].xyz));
|
||
|
light_2 = (light_2 + ((col_3.xyz * xlv_nl.z) * _TerrainTreeLightColors[2].xyz));
|
||
|
mediump vec4 tmpvar_4;
|
||
|
tmpvar_4.w = 1.0;
|
||
|
tmpvar_4.xyz = light_2;
|
||
|
tmpvar_1 = tmpvar_4;
|
||
|
_fragData = tmpvar_1;
|
||
|
}
|
||
|
|
||
|
|
||
|
// stats: 9 alu 1 tex 0 flow
|
||
|
// inputs: 2
|
||
|
// #0: xlv_uv (high float) 2x1 [-1]
|
||
|
// #1: xlv_nl (medium float) 3x1 [-1]
|
||
|
// uniforms: 1 (total size: 0)
|
||
|
// #0: _TerrainTreeLightColors (medium float) 4x1 [4]
|
||
|
// textures: 1
|
||
|
// #0: _MainTex (low 2d) 0x0 [-1]
|