Skip to content
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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Aug 1, 2024

@Calinou Calinou added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:shaders labels Aug 1, 2024
Comment on lines +354 to +357
| 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. |
+----------------------------------------+--------------------------------------------------------------------------------------------------+
Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also improves the documentation for existing render modes.
| 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. |
Copy link
Contributor

@tetrapod00 tetrapod00 Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| out float **RIM** | Rim (0..1). If used, Godot calculates rim lighting. |
| out float **RIM** | Rim (0..1). If used, Godot calculates rim lighting. Rim size depends on ``ROUGHNESS``. |

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:shaders
Projects
None yet
Development

Successfully merging this pull request may close these issues.

specular_disabled render mode in shaders does not make the SPECULAR output zero
4 participants