mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
37 lines
1.1 KiB
Text
37 lines
1.1 KiB
Text
uniform mat4 _World2Object;
|
|
uniform vec3 _WorldSpaceCameraPos;
|
|
uniform vec4 unity_Scale;
|
|
void main ()
|
|
{
|
|
vec3 viewDir_1;
|
|
vec4 tmpvar_2;
|
|
tmpvar_2.w = 1.0;
|
|
tmpvar_2.xyz = _WorldSpaceCameraPos;
|
|
viewDir_1 = -(normalize((
|
|
((_World2Object * tmpvar_2).xyz * unity_Scale.w)
|
|
- gl_Vertex.xyz)));
|
|
vec4 tmpvar_3;
|
|
tmpvar_3.w = 0.0;
|
|
tmpvar_3.xyz = (viewDir_1 - (2.0 * (
|
|
dot (gl_Normal, viewDir_1)
|
|
* gl_Normal)));
|
|
gl_Position = (gl_ModelViewProjectionMatrix * gl_Vertex);
|
|
gl_FrontColor = gl_Color;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4.w = 0.0;
|
|
tmpvar_4.xyz = (gl_ModelViewMatrix * tmpvar_3).xyz;
|
|
gl_TexCoord[0] = tmpvar_4;
|
|
}
|
|
|
|
|
|
// stats: 14 alu 0 tex 0 flow
|
|
// inputs: 3
|
|
// #0: gl_Color (high float) 4x1 [-1] loc 3
|
|
// #1: gl_Normal (high float) 3x1 [-1] loc 2
|
|
// #2: gl_Vertex (high float) 4x1 [-1] loc 0
|
|
// uniforms: 5 (total size: 0)
|
|
// #0: gl_ModelViewProjectionMatrix (high float) 4x4 [-1]
|
|
// #1: gl_ModelViewMatrix (high float) 4x4 [-1]
|
|
// #2: _World2Object (high float) 4x4 [-1]
|
|
// #3: _WorldSpaceCameraPos (high float) 3x1 [-1]
|
|
// #4: unity_Scale (high float) 4x1 [-1]
|