mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
30 lines
835 B
Text
30 lines
835 B
Text
uniform sampler2D _CameraDepthNormalsTexture;
|
|
uniform sampler2D _MainTex;
|
|
void main ()
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0].xy;
|
|
vec4 col_2;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_CameraDepthNormalsTexture, tmpvar_1);
|
|
vec3 n_4;
|
|
float g_5;
|
|
vec3 nn_6;
|
|
nn_6 = ((tmpvar_3.xyz * vec3(3.5554, 3.5554, 0.0)) + vec3(-1.7777, -1.7777, 1.0));
|
|
g_5 = (2.0 / dot (nn_6, nn_6));
|
|
n_4.xy = (g_5 * nn_6.xy);
|
|
n_4.z = (g_5 - 1.0);
|
|
col_2.x = dot (tmpvar_3.zw, vec2(1.0, 0.00392157));
|
|
col_2.y = ((n_4.x * 0.5) + 0.5);
|
|
col_2.z = ((n_4.y * 0.5) + 0.5);
|
|
col_2.w = texture2D (_MainTex, tmpvar_1).w;
|
|
gl_FragData[0] = col_2;
|
|
}
|
|
|
|
|
|
// stats: 11 alu 2 tex 0 flow
|
|
// inputs: 1
|
|
// #0: gl_TexCoord (high float) 4x1 [1] loc 4
|
|
// textures: 2
|
|
// #0: _CameraDepthNormalsTexture (high 2d) 0x0 [-1]
|
|
// #1: _MainTex (high 2d) 0x0 [-1]
|