0c9433bf44194d7d048a32b620593ca2ad489981
OpenGL uses a depth range between -1 and 1, which is then normalized. Metal & Vulkan uses a depth range between 0 and 1, which is already normalized. The final plan would be to default to a depth range between 0 and 1, but for now the depth ranges are retargetted so they won't be clipped away. This solves the next issues for users: - Navigate control will be rendered correctly - Ortographic view clipping artifacts - EEVEE light evaluation Retargetting happens at the end of the vertex stage or when a geometry stage is present at the end of the geometry stage. Derivatives using depth would have a different value compared to OpenGL, but would match Metal backend. OpenGL performs clipping and generates derivatives based on the original depth value. `gl_FragCoord` and clipping would have some precision differences as clipping and normalizing are done in a different order but would match Metal. Geometry shaders should use `gpu_EmitVertex` to ensure that the retargetting is done per vertex. Pull Request: https://projects.blender.org/blender/blender/pulls/114669
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
