mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
27 lines
677 B
Text
27 lines
677 B
Text
uniform mat4 _World2Object;
|
|
uniform vec3 _WorldSpaceCameraPos;
|
|
uniform vec4 unity_Scale;
|
|
void main ()
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1.w = 1.0;
|
|
tmpvar_1.xyz = _WorldSpaceCameraPos;
|
|
vec3 tmpvar_2;
|
|
tmpvar_2 = -(normalize((
|
|
((_World2Object * tmpvar_1).xyz * unity_Scale.w)
|
|
- gl_Vertex.xyz)));
|
|
vec4 tmpvar_3;
|
|
tmpvar_3.w = 0.0;
|
|
tmpvar_3.xyz = (tmpvar_2 - (2.0 * (
|
|
dot (gl_Normal, tmpvar_2)
|
|
* 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;
|
|
}
|
|
|
|
|
|
// inputs: 3, stats: 14 alu 0 tex 0 flow
|