-
-
Notifications
You must be signed in to change notification settings - Fork 19.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
Implement overdraw, lighting, and unshaded debug draw modes for OpenGL #86677
Conversation
c91674e
to
c1a7c9b
Compare
c1a7c9b
to
214c59f
Compare
@lyuma do you think we should have an engine implementation of the gamma conversion hack for compatibility/opengl? |
that sounds interesting, is there a link or file i can see to understand what hack you are talking about? |
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.
Looks great so far. I left a few comments that will need to be addressed. But it shouldn't be too much work. Please let me know if you have any questions!
214c59f
to
c8bdd1d
Compare
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.
Looks great to me now! Good job!
Thanks! And congrats on your first merged Godot contribution! |
Cherry-picked for 4.2.2. |
Debug lighting and unshaded should work as expected. For unshaded specifically it seems like most of the work was already there and just needed to be toggled by setting the right variant.
For overdraw mode, using the same shader as the one used in the forward renderer results in faded colours, probably due to doing blending in srgb vs linear space. one way to compensate for this is to set a higher alpha which is done in this implementation. I attached some pictures of what this looks like, although it doest quite match the forward renderer. I chose to set ALPHA=0.2 instead of ALPHA=0.1 as in forward+ (i wanted to match the colour of forward+, setting ALPHA=0.3 makes the objects look too blue compared to forward+)
bugsquad edit: Fixes #82485