roalyr / godot-for-3d-open-worlds Goto Github PK
View Code? Open in Web Editor NEWThis project forked from godotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
Home Page: https://godotengine.org
License: MIT License
This project forked from godotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
Home Page: https://godotengine.org
License: MIT License
According to ChatGPT (yes I didn't bother to find sources online again):
"No, the depth pre-pass technique does not work when using a logarithmic depth buffer. The depth pre-pass technique relies on rendering the scene geometry once to populate the depth buffer before performing the actual shading pass. This allows for early depth testing and can help reduce the number of costly fragment shader computations.
However, when using a logarithmic depth buffer, the depth values are transformed non-linearly to improve depth precision in scenes with a large depth range. This non-linear transformation makes the depth values no longer suitable for traditional depth pre-pass techniques, as the ordering of objects in the depth buffer is no longer linear.
Logarithmic depth buffers are generally used to mitigate the issues of depth precision over long distances in scenes, but they come with the trade-off of compatibility with certain rendering techniques that rely on linear depth buffers, such as the depth pre-pass."
Here are the number of rendered vertices (Godot internal monitor) and 3D draw calls.
With depth pre-pass:
Need help, it is too hard.
Godot version:
3.x and 4.x
OS/device including version:
Mobile and desktop (Android, linux).
Issue description:
When z-far is below 1e6 (which is the cap value on stock Godot 3) everything renders properly.
Otherwise - arbitrary culling occurs because z-far Plane which is returned by normalize()
function - is empty.
Steps to reproduce:
Open MRP and navigate the view in editor at different z-far values as on the video:
https://youtu.be/sY_DiETtkl8
Also in-game video:
https://youtu.be/ukl9RUnHEOw
Minimal reproduction project:
cull_bug_test_for_zfar_above_1e6.tar.gz
Ref here: godotengine#59122
.-/+oossssoo+/-. roalyr@roalyr-VirtualBox
`:+ssssssssssssssssss+:` ------------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 18.04.6 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: VirtualBox 1.2
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.4.0-122-generic
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 2 days, 55 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 1766
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 4.4.20
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1920x977
ossyNMMMNyMMhsssssssssssssshmmmhssssssso DE: Xfce
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Xfwm4
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ WM Theme: OneColor XFCE orange
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Theme: Flat-Remix-GTK-Orange-Light [GTK2]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Icons: Elementary-xfce [GTK2], Elementary
+sssssssssdmydMMMMMMMMddddyssssssss+ Terminal: xfce4-terminal
/ssssssssssshdmNNNNmyNMMMMhssssss/ Terminal Font: DejaVu Sans Mono 14
.ossssssssssssssssssdMMMNysssso. CPU: AMD 3020e with Radeon Graphics (1) @
-+sssssssssssssssssyyyssss+- GPU: VMware SVGA II Adapter
`:+ssssssssssssssssss+:` Memory: 1297MiB / 1983MiB
.-/+oossssoo+/-.
https://github.com/roalyr/godot-for-3d-open-worlds/blob/3.x/rebuild_windows.sh
roalyr@roalyr-VirtualBox /m/r/G/godot-for-3d-open-worlds> ./rebuild_windows.sh
i686-w64-mingw32-gcc (GCC) 7.3-win32 20180904
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
x86_64-w64-mingw32-gcc (GCC) 7.3-posix 20180904
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
tee: ./logs/scons_windows_tools_build.log: No such file or directory
scons: Reading SConscript files ...
Configuring for Windows: target=release_debug, bits=64
Using MinGW
Scons cache enabled... (path: './scons_cache_windows')
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> platform/windows/os_windows.cpp
In file included from platform/windows/os_windows.h:46:0,
from platform/windows/os_windows.cpp:31:
./servers/visual/rasterizer.h:128:56: warning: 'RasterizerScene::InstanceBase::interpolation_method' is too small to hold all values of 'enum TransformInterpolator::Method'
TransformInterpolator::Method interpolation_method : 3;
^
In file included from ./scene/main/viewport.h:35:0,
from ./servers/arvr/arvr_interface.h:36,
from ./servers/visual/visual_server_viewport.h:36,
from ./servers/visual/visual_server_canvas.h:35,
from ./servers/visual/visual_server_raster.h:37,
from platform/windows/os_windows.cpp:45:
./scene/main/node.h:138:26: warning: 'Node::Data::pause_mode' is too small to hold all values of 'enum Node::PauseMode'
PauseMode pause_mode : 2;
^
./scene/main/node.h:139:57: warning: 'Node::Data::physics_interpolation_mode' is too small to hold all values of 'enum Node::PhysicsInterpolationMode'
PhysicsInterpolationMode physics_interpolation_mode : 2;
^
In file included from ./servers/visual/visual_server_raster.h:39:0,
from platform/windows/os_windows.cpp:45:
./servers/visual/visual_server_scene.h:90:56: warning: 'VisualServerScene::Camera::interpolation_method' is too small to hold all values of 'enum TransformInterpolator::Method'
TransformInterpolator::Method interpolation_method : 3;
^
platform/windows/os_windows.cpp: In constructor 'OS_Windows::OS_Windows(HINSTANCE)':
platform/windows/os_windows.cpp:4009:13: error: 'ENABLE_VIRTUAL_TERMINAL_PROCESSING' was not declared in this scope
outMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
platform/windows/os_windows.cpp:4009:13: note: suggested alternative: 'MM_SPECTRUM_SIGNAL_PROCESSING'
outMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MM_SPECTRUM_SIGNAL_PROCESSING
scons: *** [platform/windows/os_windows.windows.opt.tools.64.o] Error 1
scons: building terminated because of errors.
[Time elapsed: 00:00:36.268]
tee: ./logs/scons_windows_debug_build.log: No such file or directory
scons: Reading SConscript files ...
Configuring for Windows: target=release_debug, bits=64
Using MinGW
Scons cache enabled... (path: './scons_cache_windows')
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> platform/windows/os_windows.cpp
In file included from platform/windows/os_windows.h:46:0,
from platform/windows/os_windows.cpp:31:
./servers/visual/rasterizer.h:128:56: warning: 'RasterizerScene::InstanceBase::interpolation_method' is too small to hold all values of 'enum TransformInterpolator::Method'
TransformInterpolator::Method interpolation_method : 3;
^
In file included from ./scene/main/viewport.h:35:0,
from ./servers/arvr/arvr_interface.h:36,
from ./servers/visual/visual_server_viewport.h:36,
from ./servers/visual/visual_server_canvas.h:35,
from ./servers/visual/visual_server_raster.h:37,
from platform/windows/os_windows.cpp:45:
./scene/main/node.h:138:26: warning: 'Node::Data::pause_mode' is too small to hold all values of 'enum Node::PauseMode'
PauseMode pause_mode : 2;
^
./scene/main/node.h:139:57: warning: 'Node::Data::physics_interpolation_mode' is too small to hold all values of 'enum Node::PhysicsInterpolationMode'
PhysicsInterpolationMode physics_interpolation_mode : 2;
^
In file included from ./servers/visual/visual_server_raster.h:39:0,
from platform/windows/os_windows.cpp:45:
./servers/visual/visual_server_scene.h:90:56: warning: 'VisualServerScene::Camera::interpolation_method' is too small to hold all values of 'enum TransformInterpolator::Method'
TransformInterpolator::Method interpolation_method : 3;
^
platform/windows/os_windows.cpp: In constructor 'OS_Windows::OS_Windows(HINSTANCE)':
platform/windows/os_windows.cpp:4009:13: error: 'ENABLE_VIRTUAL_TERMINAL_PROCESSING' was not declared in this scope
outMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
platform/windows/os_windows.cpp:4009:13: note: suggested alternative: 'MM_SPECTRUM_SIGNAL_PROCESSING'
outMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MM_SPECTRUM_SIGNAL_PROCESSING
scons: *** [platform/windows/os_windows.windows.opt.debug.64.o] Error 1
scons: building terminated because of errors.
[Time elapsed: 00:00:26.282]
strip: './bin/godot.windows.*': No such file
Need help figuring out how to fully implement depth-related shading effects, such as shadows, depth-of-field, etc.
See #6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.