add player controller

This commit is contained in:
2023-05-24 00:44:16 +03:00
parent 11ee2c7949
commit 57710b7b7e
5 changed files with 156 additions and 1 deletions

View File

@ -33,7 +33,7 @@ void fragment() {
// LinearSceneDepth:4
{
float __log_depth = textureLod(depth_tex_frg_4, SCREEN_UV, 0.0).x;
vec4 __depth_view = INV_PROJECTION_MATRIX * vec4(vec3(SCREEN_UV, __log_depth) * 2.0 - 1.0, 1.0);
vec4 __depth_view = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, __log_depth, 1.0);
__depth_view.xyz /= __depth_view.w;
n_out4p0 = -__depth_view.z;
}