Implement overdraw, lighting, and unshaded debug draw modes for OpenGL#86677
Merged
Conversation
c91674e to
c1a7c9b
Compare
c1a7c9b to
214c59f
Compare
Member
|
@lyuma do you think we should have an engine implementation of the gamma conversion hack for compatibility/opengl? |
Contributor
Author
that sounds interesting, is there a link or file i can see to understand what hack you are talking about? |
clayjohn
reviewed
Jan 6, 2024
214c59f to
c8bdd1d
Compare
clayjohn
approved these changes
Jan 22, 2024
clayjohn
left a comment
Member
There was a problem hiding this comment.
Looks great to me now! Good job!
Contributor
|
Thanks! And congrats on your first merged Godot contribution! |
Member
|
Cherry-picked for 4.2.2. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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