mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
13 lines
360 B
Text
13 lines
360 B
Text
uniform vec4 _ZBufferParams;
|
|
uniform sampler2D _MainTex;
|
|
uniform sampler2D _CameraDepthTexture;
|
|
void main ()
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0].xy;
|
|
vec4 col;
|
|
col = texture2D (_MainTex, tmpvar_1);
|
|
col.xy = vec2(((1.0/(((_ZBufferParams.z * texture2D (_CameraDepthTexture, tmpvar_1).x) + _ZBufferParams.w))) * 0.01));
|
|
gl_FragData[0] = col;
|
|
}
|
|
|