-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add 3->4 upgrading information about NDC, light(), and reverse-z #9940
Conversation
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.
Flarkk's recommendations are good. Everything else looks good, so this can be merged once you make those changes
b5e1f27
to
0926f45
Compare
0926f45
to
e931be8
Compare
e931be8
to
4cda78b
Compare
I think that's everything. Thank you for the reviews! |
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.
Thank you!
@tetrapod00 Thank you! Merged. |
Cherrypicked to 4.3 in #10346. |
Resolves godotengine/godot#96704 by changing the docs.
Summary of the original issue: a simplified version of the shader in https://github.com/paddy-exe/Godot-RealTimeCaustics was converted automatically from 3 to 4, then all the manual fixes mentioned here were applied. But the shader still has no visible output.
Two additional changes had to be made so the shader works in 4.3 Forward+:
vec3 ndc = vec3(SCREEN_UV, depth) * 2.0 - 1.0;
tovec3 ndc = vec3(SCREEN_UV* 2.0 - 1.0, depth);
.ALBEDO = vec3(0.0);
toALBEDO = vec3(1.0);
. The shader is doing additive lighting using thelight()
function, and requires a change to ALBEDO to look similar to 3.x.These kinds of changes cannot be supported by an automatic conversion tool, and they can't even be exhaustively listed. We can list common cases, and clarify the warning that advanced shaders will need more manual work.
I didn't actually use 3.x, so my knowledge of this is only from converting shaders.