mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
17 lines
423 B
Text
17 lines
423 B
Text
uniform sampler2D _CameraDepthTexture;
|
|
uniform sampler2D _MainTex;
|
|
uniform vec4 _ZBufferParams;
|
|
void main ()
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0].xy;
|
|
vec4 col_2;
|
|
col_2.zw = texture2D (_MainTex, tmpvar_1).zw;
|
|
col_2.xy = vec2(((1.0/((
|
|
(_ZBufferParams.z * texture2D (_CameraDepthTexture, tmpvar_1).x)
|
|
+ _ZBufferParams.w))) * 0.01));
|
|
gl_FragData[0] = col_2;
|
|
}
|
|
|
|
|
|
// inputs: 1, stats: 4 alu 2 tex 0 flow
|