mat2 xll_transpose_mf2x2(mat2 m) { return mat2( m[0][0], m[1][0], m[0][1], m[1][1]); } mat3 xll_transpose_mf3x3(mat3 m) { return mat3( m[0][0], m[1][0], m[2][0], m[0][1], m[1][1], m[2][1], m[0][2], m[1][2], m[2][2]); } mat4 xll_transpose_mf4x4(mat4 m) { return mat4( m[0][0], m[1][0], m[2][0], m[3][0], m[0][1], m[1][1], m[2][1], m[3][1], m[0][2], m[1][2], m[2][2], m[3][2], m[0][3], m[1][3], m[2][3], m[3][3]); } float xll_saturate_f( float x) { return clamp( x, 0.0, 1.0); } vec2 xll_saturate_vf2( vec2 x) { return clamp( x, 0.0, 1.0); } vec3 xll_saturate_vf3( vec3 x) { return clamp( x, 0.0, 1.0); } vec4 xll_saturate_vf4( vec4 x) { return clamp( x, 0.0, 1.0); } mat2 xll_saturate_mf2x2(mat2 m) { return mat2( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0)); } mat3 xll_saturate_mf3x3(mat3 m) { return mat3( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0)); } mat4 xll_saturate_mf4x4(mat4 m) { return mat4( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0), clamp(m[3], 0.0, 1.0)); } highp mat3 unity_DirBasis; #line 8 uniform sampler2D mytex; #line 17 #line 8 mediump vec4 DirLM( in lowp vec3 scale, in lowp vec3 normal ) { mediump vec3 normalInDirBasis = xll_saturate_vf3((unity_DirBasis * normal)); highp float f = dot( normalInDirBasis, scale); #line 12 return vec4( f); } #line 17 lowp vec4 xlat_main( in mediump vec2 uv, in lowp vec3 normal ) { lowp vec3 scale = texture2D( mytex, uv).xyz; return DirLM( scale, normal); } varying mediump vec2 xlv_TEXCOORD0; varying lowp vec3 xlv_TEXCOORD1; void main() { unity_DirBasis = xll_transpose_mf3x3(mat3( vec3( 0.8164966, 0.0, 0.5773503), vec3( -0.4082483, 0.7071068, 0.5773503), vec3( -0.4082483, -0.7071068, 0.5773503))); lowp vec4 xl_retval; xl_retval = xlat_main( vec2(xlv_TEXCOORD0), vec3(xlv_TEXCOORD1)); gl_FragData[0] = vec4(xl_retval); } // uniforms: // mytex: type 25 arrsize 0