-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Spatial Shader with no render_mode set appears to default to "specular_disabled" rather than "specular_schlick_ggx" #46838
Comments
Edit: the default behaviour is actually a little odd. Internally, the light function runs through an if/elif branch to determine the specular mode. If no mode is set, no specular is added (same as the specular_disabled branch). This makes the de facto default "disabled". However, for vertex-lit materials, the logic is "use blinn unless disabled" so the default is to use Blinn if nothing is specified. I guess we need to clean up this behaviour and make it consistent. And the best way to do that is probably to change the if/elif branch to make GGX default e.g. change the final "elif" to an "else" See here: godot/drivers/gles3/shaders/scene.glsl Lines 1134 to 1140 in 64a9e86
and here: godot/drivers/gles2/shaders/scene.glsl Lines 1357 to 1362 in 64a9e86
|
I would like to work on this issue. Could you assign me here, please? |
@AnaDenisa Thanks for your interest in contributing! No need to be assigned – you can start working on it directly 🙂 |
Hi, to what branch a commit should be made? |
@JonatasOrsini The general rule is to open pull requests against the The |
I'm not sure about this, looking at the shader there are several locations where But more importantly, |
Please diregard my entry. |
Godot version:
3.2.4.rc4
OS/device including version:
NA
Issue description:
When no specular rendermode is specified, Spatial Shaders appear to default to specular_disabled. The manual says that specular_schlick_ggx is supposed to be the default. specular_schlick_ggx also is set both when converting a Spatial Material to a shader and making a visual shader, so it appears it should be the default everywhere?
https://docs.godotengine.org/en/stable/tutorials/shading/shading_reference/spatial_shader.html#render-modes
Steps to reproduce:
See screebshot above
Minimal reproduction project:
See screebshot above
The text was updated successfully, but these errors were encountered: