-
Notifications
You must be signed in to change notification settings - Fork 860
DecalRendererFeature: Convert to using RTHandles #6401
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
Conversation
|
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. URP Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
Pass: Remove RTI alises of universal renderer targets, these do not work with RTHandles, you must get the actual references. Pass: Convert dBufferColorHandles[0-2] and m_DBufferDepth to RTHandles Pass: Set global textures in execute to use the same cmd. Feature: Call pass dispose Feature: Move setup of targets to Pass' Setup Function called from SetupRenderPasses
0e6e405 to
ae16a85
Compare
|
The following red nightly tests are fixed by this PR for 230 Decal Projector:
|
| depthHandle = m_CameraDepthAttachment; | ||
| } | ||
|
|
||
| ConfigureTarget(dBufferColorHandles, depthHandle); |
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.
I noticed we usually call ConfigureTarget on OnCameraSetup/Configure, wouldn't be issue calling it outside it?
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.
I'm not sure. So far, I don't think so.
The bigger issues I had was getting targets from universal renderer too early.
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.
K so if it works it is okay. I think I will split it in my https://github.com/Unity-Technologies/Graphics/pull/6442/files.
|
Merged master to rerun tests as there were some failures that were already fixed in master and that was quite hard to compare. |
| { | ||
| UniversalRenderer universalRenderer = (UniversalRenderer)renderer; | ||
| if (universalRenderer.renderingMode == RenderingMode.Deferred) | ||
| if (universalRenderer.renderingModeRequested == RenderingMode.Deferred) |
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.
Could you add info why this needs to be changed?
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.
This was to make it more clear to understand. RenderingMode is the rendering mode settings and then there was another RenderingModeActual which was the one that is the actual one used and considered when falling back. The renderinMode was renamed to renderingModeRequested to be more clear this is the requested mode that comes from settings but not necessary the mode that is used.
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.
Should I add it to the changelog, maybe?
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.
These are internal / private. No reason to mention in changelog.
eh-unity
left a comment
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.
Please clarify request vs. actual rendering mode usage in the renderer. Otherwise lgtm.
| } | ||
|
|
||
| if (this.renderingMode == RenderingMode.Deferred) | ||
| if (this.renderingModeRequested == RenderingMode.Deferred) |
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.
Why these use renderingModeRequested? Shouldn't these depend on the renderingModeActual?
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.
@sandy-carter-unity this is a good point. It seems sensible that the actual rendering mode is figured out very early before all of these settings.
Actually, thinking about it a little bit now, we should expose a property to get the rendering mode that always return the actual one and the requested / setting is private setting, this makes it less confusing.
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.
Is this what you mean?
private RenderingMode renderingModeRequested => m_RenderingMode;
internal RenderingMode renderingModeActual => ...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.
At that point, we could remove the renderingModeRequested property entirely
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.
Yeah, ok I see the renderingModeRequested is private now, but that feels useless tbh as you can just have m_RenderingMode?
|
This PR introduces some new failures in Android, but given that it fixes several other failures I will take it to improve the overall coverage situation. |
Pass: Remove RTI alises of universal renderer targets, these do not work
with RTHandles, you must get the actual references.
Pass: Convert dBufferColorHandles[0-2] and m_DBufferDepth to RTHandles
Pass: Set global textures in execute to use the same cmd.
Feature: Call pass dispose
Feature: Move setup of targets to Pass' Setup Function called from
SetupRenderPasses
Please read the Contributing guide before making a PR.
Checklist for PR maker
CHANGELOG.mdfile.Purpose of this PR
The intention of this PR is fix breaking test 230 in Foundation.
It also fixes targets that weren't yet converted to RTHandles.
Testing status
Test 230_Decal_Projector from UniversalGraphicsTest_Foundation was run with the
-xr-reuse-testswhich reliably produced a red test.The test seemed to also fail more often if run after 120 to 124. This was also tested.
Comments to reviewers
Notes for the reviewers you have assigned.