Skip to content
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

[HDRP][Compositor] Fix issue with gameview repaint #2617

Merged
merged 2 commits into from
Nov 19, 2020

Conversation

pmavridis
Copy link
Contributor

@pmavridis pmavridis commented Nov 13, 2020

Purpose of this PR

https://fogbugz.unity3d.com/f/cases/1290622/
The game view was not re-painted properly when side-by-side with scene view.
(Note: the bug is only reproducible when game-view and scene-view were used side-by-side)

This is a change in behavior from the C++ side (the game view is now updated only once, unless you move your mouse on top of it). We already had some code in the compositor to guarantee that the game view is updated at least a few times per second, so I have updated the code to work on the new Unity version.


Testing status

  • Tested toggling the compositor's preview on and off with the game view side-by-side with scene view. The game view now properly updates (no mouse move is necessary).
  • This is only a small change in editor/ui code, so I did not run the tests.

@pmavridis pmavridis added the HDRP label Nov 13, 2020
@pmavridis pmavridis requested review from sebastienlagarde and a team November 13, 2020 10:51
@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page)
and cancel any jobs that started on Yamato.
See the PR template for more information.
Thank you!

@pmavridis
Copy link
Contributor Author

pmavridis commented Nov 13, 2020

There are two issues related to this bug:

  • The first issue is that with the new Unity version, the game view window in the compositor was not refreshing as expected. The intended behavior for the compositor is that the gameview should always re-paint at least a few times per second, so people will see the changes when changing TAA modes, toggling layers etc. Without the fix the game view renders only the first frame (with or without the scene view side-by-side). This PR fixes this issue.
  • There is another issue in HDRP that the first frame is black or white when game-view and scene view are side-by-side. This PR does not fix this issue, but it is something that we should also fix. In this PR I only kept the compositor related issue.

Copy link
Contributor

@remi-chapelain remi-chapelain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to test with a moving object to be sure that everything repainted properly (since the repro included an empty static scene). All good ✔️

@sebastienlagarde sebastienlagarde merged commit b2812d4 into hd/bugfix Nov 19, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/case_1290622 branch November 19, 2020 11:20
sebastienlagarde added a commit that referenced this pull request Nov 23, 2020
* Update 1900_AlphaTestSG.renderTexture (#2608)

* update GBuffer description.

* Added a warning when trying to bake with static lighting being in an invalid state. (#2597)

* Added a warning when trying to bake with static lighting being in an invalid state.

* Update changelog.

* [HDRP] Fix runtime debug UI showing wrong entry (#2595)

* Redraw debug before re-registring the debugs

* changelog

* Fixed multi-editing with new light intensity slider (#2600)

* Fixed multi-editing with new light intensity slider

* Only update floatValue when changed

* Fixed useless editor repaint when using lod bias (#2601)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix issue with density volume gizmo editing (#2603)

* Fix

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [HDRP][Compositor] Fix issues with image layers (#2606)

* Empty image layers in the graphics compositor don't render black anymore

* Improve camera management in compositor

* Revert "Improve camera management in compositor"

This reverts commit cc3971d.

* Update changelog

* For image layers that are first, still clear to black if no texture is attached

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed issue when decal projector material is none (#2615)

* Fixed angle fading when rotating decal projector (#2618)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix issue with gameview repaint in the graphics compositor (#2617)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Remove cyanish color shifting during sharpening in YCoCg in TAA (#2627)

* Do sharpening in RGB space.

* Fix alpha case

* Oops

* Ref update aside OSX

* OSX refs

* More refs

* Missing refs.

* Did I get the wrong ref?

* Fixed the sampling of the normal buffer in the the forward transparent pass. (#2643)

* Fixed the sampling of the normal buffer in the the forward transparent pass.

* Update changelog

* Update CHANGELOG.md

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Fix custom pass reorder issue (#2609)

* Fix custom pass reorder issue

* Fix bad comment

* Refactor

* Fix bloom prefiltering tooltip (#2715)

* update reference screenshot for test 1900_AlphaTest_SG

* Fix error when loading new scene (#2713)

* Fix error when loading new scene

* Update CHANGELOG.md

* AxF Fix missing alpha blend state properties and update stencil prop (#2705)

* AxF: Fix missing alpha blend state properties and update stencil properties.

* Add changelog entry.

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix custom pass normal and template (#2716)

* Fix custom pass template not compiling

* Fix custom pass normal buffer not bound

* Updated changelog

* Update CHANGELOG.md

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* [HDRP][Compositor] Fix edge cases when cameras are missing or deleted  (#2700)

* Fix warning spam related to cameras in compositor

* Fix null reference in AOVs

* Fix null reference when disabling camera in the compositor

* Reset target texture when disabling the compositor

* Update changelog + fix warning when output camera is deleted

* Fix issue when adding image layer without any cameras in the scene

* Fix error when disabling layer with no camera

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Update CHANGELOG.md

Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Co-authored-by: slunity <37302815+slunity@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants