-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update list of spatial shader render modes for Godot 4.3 #9691
Open
Calinou
wants to merge
1
commit into
godotengine:master
Choose a base branch
from
Calinou:spatial-shader-update-render-modes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+29
−18
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -22,6 +22,8 @@ Render modes | |||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **blend_mul** | Multiplicative blend mode. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **blend_premul_alpha** | Premultiplied alpha blend mode (fully transparent = add, fully opaque = mix). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **depth_draw_opaque** | Only draw depth for opaque geometry (not transparent). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **depth_draw_always** | Always draw depth (opaque and transparent). | | ||||||
|
@@ -32,55 +34,57 @@ Render modes | |||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **depth_test_disabled** | Disable depth testing. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **sss_mode_skin** | Subsurface Scattering mode for skin. | | ||||||
| **sss_mode_skin** | Subsurface Scattering mode for skin (optimizes visuals for human skin, e.g. boosted red channel). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **cull_back** | Cull back-faces (default). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **cull_front** | Cull front-faces. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **cull_disabled** | Culling disabled (double sided). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **unshaded** | Result is just albedo. No lighting/shading happens in material. | | ||||||
| **unshaded** | Result is just albedo. No lighting/shading happens in material, making it faster to render. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **wireframe** | Geometry draws using lines (useful for troubleshooting). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **wireframe** | Geometry draws using lines. | | ||||||
| **debug_shadow_splits** | Directional shadows are drawn using different colors for each split (useful for troubleshooting). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **diffuse_burley** | Burley (Disney PBS) for diffuse (default). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **diffuse_lambert** | Lambert shading for diffuse. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **diffuse_lambert_wrap** | Lambert wrapping (roughness dependent) for diffuse. | | ||||||
| **diffuse_lambert_wrap** | Lambert-wrap shading (roughness-dependent) for diffuse. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **diffuse_toon** | Toon shading for diffuse. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **specular_schlick_ggx** | Schlick-GGX for specular (default). | | ||||||
| **specular_schlick_ggx** | Schlick-GGX for direct light specular lobes (default). | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **specular_toon** | Toon for specular. | | ||||||
| **specular_toon** | Toon for direct light specular lobes. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **specular_disabled** | Disable specular. | | ||||||
| **specular_disabled** | Disable direct light specular lobes. Doesn't affect reflected light (use ``SPECULAR = 0.0`` instead).| | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **skip_vertex_transform** | VERTEX/NORMAL/etc. need to be transformed manually in vertex function. | | ||||||
| **skip_vertex_transform** | ``VERTEX``/``NORMAL``/etc. need to be transformed manually in the ``vertex()`` function. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **world_vertex_coords** | VERTEX/NORMAL/etc. are modified in world coordinates instead of local. | | ||||||
| **world_vertex_coords** | ``VERTEX``/``NORMAL``/etc. are modified in world coordinates instead of local. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **ensure_correct_normals** | Use when non-uniform scale is applied to mesh. | | ||||||
| **ensure_correct_normals** | Use when non-uniform scale is applied to mesh *(note: currently unimplemented)*. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **shadows_disabled** | Disable computing shadows in shader. | | ||||||
| **shadows_disabled** | Disable computing shadows in shader. The shader will not cast shadows, but can still receive them. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **ambient_light_disabled** | Disable contribution from ambient light and radiance map. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **shadow_to_opacity** | Lighting modifies the alpha so shadowed areas are opaque and | | ||||||
| | non-shadowed areas are transparent. Useful for overlaying shadows onto | | ||||||
| | a camera feed in AR. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **vertex_lighting** | Use vertex-based lighting. | | ||||||
| **vertex_lighting** | Use vertex-based lighting *(note: currently unimplemented)*. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **particle_trails** | Enables the trails when used on particles geometry. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **alpha_to_coverage** | Alpha antialiasing mode, see `here <https://github.com/godotengine/godot/pull/40364>`_ for more. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **alpha_to_coverage_and_one** | Alpha antialiasing mode, see `here <https://github.com/godotengine/godot/pull/40364>`_ for more. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
| **fog_disabled** | Disable receiving depth-based or volumetric fog. Useful for blend_add materials like particles. | | ||||||
| **fog_disabled** | Disable receiving depth-based or volumetric fog. Useful for ``blend_add`` materials like particles. | | ||||||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||||||
|
||||||
Built-ins | ||||||
|
@@ -347,17 +351,21 @@ these properties, and if you don't write to them, Godot will optimize away the c | |||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out vec2 **ALPHA_TEXTURE_COORDINATE** | | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **PREMUL_ALPHA_FACTOR** | Premultiplied alpha factor. Only effective if ``render_mode blend_premul_alpha;`` is used. | | ||||||
| | This should be written to when using a *shaded* material with premultiplied alpha blending for | | ||||||
| | interaction with lighting. This is not required for unshaded materials. | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **METALLIC** | Metallic (0..1). | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **SPECULAR** | Specular. Defaults to 0.5, best not to modify unless you want to change IOR. | | ||||||
| out float **SPECULAR** | Specular (not physically accurate to change). Defaults to ``0.5``. ``0.0`` disables reflections. | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **ROUGHNESS** | Roughness (0..1). | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **RIM** | Rim (0..1). If used, Godot calculates rim lighting. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Same wording as here. Rim light "not showing up" when the roughness is set to the default value of 1 is a common enough problem to document here IMO. |
||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **RIM_TINT** | Rim Tint, goes from 0 (white) to 1 (albedo). If used, Godot calculates rim lighting. | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **CLEARCOAT** | Small added specular blob. If used, Godot calculates Clearcoat. | | ||||||
| out float **CLEARCOAT** | Small specular blob added on top of the existing one. If used, Godot calculates Clearcoat. | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
| out float **CLEARCOAT_GLOSS** | Gloss of Clearcoat. If used, Godot calculates Clearcoat. | | ||||||
+----------------------------------------+--------------------------------------------------------------------------------------------------+ | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas of a concrete example? I've based this description on the existing class reference, but it's not really obvious how you're supposed to write to it in a typical shaded PBR material scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @clayjohn @Chaosus