From 0a1a4bbd3858ee3f1d92ab9eb728605a966e46bc Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 16 May 2024 12:34:03 +0200 Subject: [PATCH] Improve OpenGL documentation in Internal rendering architecture - Mention that OpenGL ES can be run directly on desktop platforms with a command line argument. - Remove notice about some OpenGL features being unimplemented, as the Compatibility rendering is pretty much feature-complete as of 4.3. - Update URL for the Vulkan rendering driver to follow RenderingDeviceDriver changes. - Fix incorrect notice about the D3D12 rendering driver transpiling GLSL to HLSL (it transpiles SPIR-V to DXIL instead). --- .../internal_rendering_architecture.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/contributing/development/core_and_modules/internal_rendering_architecture.rst b/contributing/development/core_and_modules/internal_rendering_architecture.rst index 03dfc9dc82d..8dddd59aa1b 100644 --- a/contributing/development/core_and_modules/internal_rendering_architecture.rst +++ b/contributing/development/core_and_modules/internal_rendering_architecture.rst @@ -193,10 +193,9 @@ Both the Forward+ and Mobile :ref:`doc_internal_rendering_architecture_methods` used with Direct3D 12. :ref:`doc_internal_rendering_architecture_core_shaders` are shared with the -Vulkan renderer. Shaders are transpiled from GLSL to HLSL using +Vulkan renderer. Shaders are transpiled from :abbr:`GLSL (OpenGL Shading Language)` +to :abbr:`DXIL (DirectX Intermediate Language)` using Mesa NIR (`more information `__). -This means you don't need to know HLSL to work on the Direct3D 12 renderer, -although knowing the language's basics is recommended to ease debugging. **This driver is still experimental and only available in Godot 4.3 and later.** While Direct3D 12 allows supporting Direct3D-exclusive features on Windows 11 such @@ -228,14 +227,19 @@ support Vulkan. OpenGL 3.3 Core Profile is used on desktop platforms to run this driver, as most graphics drivers on desktop don't support OpenGL ES. WebGL 2.0 is used for web exports. +It is possible to use the use of OpenGL ES 3.0 directly on desktop platforms +using the ``--rendering-driver opengl3_es`` command line argument, although this +will only work on graphics drivers that feature native OpenGL ES support (such +as Mesa). + Only the :ref:`doc_internal_rendering_architecture_compatibility` rendering method can be used with the OpenGL driver. :ref:`doc_internal_rendering_architecture_core_shaders` are entirely different from the Vulkan renderer. -**As of May 2023, this driver is still in development.** Many features -are still not implemented, especially in 3D. +Many advanced features are not supported with this driver, as it targets low-end +devices first and foremost. Summary of rendering drivers/methods ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -272,7 +276,7 @@ RenderingDevice presents a similar level of abstraction as Metal or WebGPU. **Vulkan RenderingDevice implementation:** -- `drivers/vulkan/rendering_device_vulkan.cpp `__ +- `drivers/vulkan/rendering_device_driver_vulkan.cpp `__ **Direct3D 12 RenderingDevice implementation:** @@ -731,8 +735,7 @@ Occlusion culling ^^^^^^^^^^^^^^^^^ While modern GPUs can handle drawing a lot of triangles, the number of draw -calls in complex scenes can still be a bottleneck (even with Vulkan and Direct3D -12). +calls in complex scenes can still be a bottleneck (even with Vulkan and Direct3D 12). Godot 4 supports occlusion culling to reduce overdraw (when the depth prepass is disabled) and reduce vertex throughput.