Skip to content

Conversation

@phi-lira
Copy link
Contributor

@phi-lira phi-lira commented Dec 9, 2021

manuele-bonanno and others added 13 commits December 7, 2021 09:07
* adding depth resolve support to the NativeRenderPass path. This requires trunk changes as well

* fixed an issue with empty NativeRenderPasses caused by the InvokeOnRenderObjectCallback pass

* fixed Vulkan depth copy pass

* removed outdated TODO comment

* fixed depth texture sampler issue with the PrimedDepthCopyPass when depth priming is enabled

* GLES depth prepass fixes for the native render pass path

* initializing depth descriptor bindMS to false

* added comment explaining why InvokeOnRenderObjectCallbackPass has NativeRenderPass disabled

* fix for store actions optimizations flag always set to false

* updated old comment about GLES copy depth issues
* making some halfs to floats to avoid light banding on TBDRs

* Update com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl

Co-authored-by: Felipe Lira <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Felipe Lira <[email protected]>
This change adds a small comment to the URP PostPro tests which explains
the reasoning for an assert related to mixed lighting.
* removed the injected pass detection logic from SetupRenderPasses to re-enable store action optimizations

* fixed load actions setup
…6426)

The RTHandles conversion puts the XR depth slice for SPI (-1) on all
targets at an earlier stage. All equals checks against CameraTarget must
dismiss possible depth slice to be accurate.

This fixes a depth non-clear in vfx BatchRenderGroup_URP tests by
preventing `m_FirstTimeCameraDepthTargetIsBound` from being set to `false`
before batch opaque draw call.
* fix finishPostProcessOnScreen check 2D renderer

* add changelog

* Remove redundant bool

Co-authored-by: Felipe Lira <[email protected]>
* DecalRendererFeature: Convert to using RTHandles

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

* URP: Rename rendering mode to avoid confusion between requested and actual

* Decals: Check actual rendering mode to see if deferred

Co-authored-by: Felipe Lira <[email protected]>
* Fix spaces in the resource path.

* More space fixes.

* Fix default particle shader path.
This commit reverses an unintentional change to the scene view's
handling of the render scale setting. This change was introduced
in #6274.

This commit also attempts to consolidate some of the render scale logic
in URP's code by modifying the shader constant logic to query the scaled
camera dimensions directly from the camera target descriptor rather than
calculating them again.

Co-authored-by: Felipe Lira <[email protected]>
Also 104_Decal_and_... has a guid change that needed fixing.
* Move FXAA Logic to Common.hlsl

This change moves the FXAA HLSL implementation into the common post
processing shader file. This will make it easier to execute the FXAA
shader logic outside of the FinalPost pass which is a prerequisite for
FSR.

This change also modifies the FXAA Load helper function to make it use
point sampling instead of linear sampling on GLES. This should yield
more consistent behavior between GLES and non-GLES environments.

* Upscaling Filter Controls

This change adds a new property to the pipeline asset that allows users
to control which filter is used when upscaling is performed. The current
implementation supports selecting either bilinear or nearest-neighbor.
Additional methods of filtering will be added in future changes.

* Converted isScaledRender to an Enum

This change adds a new enum called ImageScaling which enumerates all
possible image scaling scenarios. This helps make the scaling related
conditional logic easier to read.

* Add Automatic Upscaling Filter

This change splits the upscaling filter selected by the user from the
one used within URP's implementation to allow for a "meta filter"
called Auto. This new filter automatically switches between bilinear
and nearest-neighbor filtering based on the current rendering
environment's ability to perform integer scaling.

* Rename Point Sampling Shader Macro

This change renames the _FILTER_POINT macro to _POINT_SAMPLING to
improve consistency with future FSR changes.

* Fix XR Compatibility for FXAA Common Code

This change updates the FXAA common shader functions to support 2d array
input textures which are used in XR's single pass instanced mode.

* Upscaling Filter Tests for URP

This commit adds new test cases for the upscaling filters that were
added in a previous change.

* Replace TemporaryRT with RTHandle

This change updates the upscaling setup logic to use an RTHandle instead
of a temporary render target.

* Updated Changelog

Updated the URP changelog to reflect the upscaling filter changes and
the FXAA scaling fix.

* Fix Black Screen for XR

This change resolves a black screen issue on XR platforms
(tested in the mock HMD) which was caused by missing support for
draw procedural in the upscaling setup shader.

* Revert Auto-Format Changes

This commit reverts the auto-format changes made in
PostProcessData.asset.

* Upscale Setup Shader Naming Consistency Fix

This commit renames upscaleSetupPs -> upscaleSetupPS to make the
naming consistent with other shaders.

* Apply Review Feedback

This commit addresses various pieces of review feedback such as missing
docs, renames, and data visibility. It also fixes a draw procedural
related multi-compile option.

* Comment Updates for UpscaleSetup.shader

This change adds a comment block in the upscaling setup shader that
describes the cases where it's used and why.

* Renamed UpscaleSetup to ScalingSetup

This change renames the extra scaling blit pass to better communicate
that it can be used in both upscaling and downscaling scenarios.

* Reworded Changelog Notes

This change adds additional information to the changelog notes for the
upscaling filters.
* Port HDRP Mip Bias Logic to URP

This change integrates the mip bias logic from HDRP into URP. This logic
ensures that shaders select their mips based on the final screen
resolution rather than the current render resolution. In cases where
aggressive upscaling is taking place, this can significantly improve
texture detail in the final image.

* Combined Mip Bias Constants Into Vector

This change combines the mip bias shader constants into a single vector
rather than having two separate scalar values. This may improve
performance on older mobile devices and shouldn't hurt performance on
modern ones.
@phi-lira phi-lira requested review from a team as code owners December 9, 2021 10:48
@github-actions
Copy link

github-actions bot commented Dec 9, 2021

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.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

URP
/jobDefinition/.yamato%252Fall-urp.yml%2523PR_URP_trunk
With changes to URP packages, you should also run
/jobDefinition/.yamato%2Fall-lightmapping.yml%23PR_Lightmapping_trunk

VFX
/jobDefinition/.yamato%252Fall-vfx.yml%2523PR_VFX_trunk

SRP Core
You could run ABV on your branch before merging your PR, but it will start A LOT of jobs. Please be responsible about it and run it only when you feel the PR is ready:
/jobDefinition/.yamato%252F_abv.yml%2523all_project_ci_trunk
Be aware that any modifications to the Core package impacts everyone in the Graphics repo so please discuss the PR with your lead.

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.

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

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

manuele-bonanno and others added 3 commits December 9, 2021 15:36
…es (#6543)

# Conflicts:
#	com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs
* Metal HDRP ref screenshots update (#6507)

* Fix typo in comment.

* Fix overlay depth.

* Add test case.

* Fix missing depth for overlay DoF. Workaround MacOS depth as wireframe driver bug.

URPasset has a depth texture checkbox, but that fixes the depth issue as well, but it's meant to be manual "force include depth" for case that can't be autodetected.
This one is correctly detected, but hardcode to not include depth (which is removed in this commit).

* Revert bug workaround. It's in another PR.

* Revert "Add test case."

This reverts commit c2e3067.

* Edit changelog.

Co-authored-by: sebastienlagarde <[email protected]>
Co-authored-by: Felipe Lira <[email protected]>
* Created ShaderDebugPrintManager.

* Forgot the meta file.

* Simple readback just to test that the buffer binding works.

* Added HLSL header. Fixed buffer clearing.

* Add mouse input.

* Encoding/decoding the debug output.

* Add a check for buffer overflow.

* Add input constants

* Mouse pos on surface
* Mouse buttons
* Frame number

* Switch framenumber input from vec4f.x to int. Wrap shader debug inputs into functions. Add convenience functions for printing at mouse cursor.

* Added tagged versions of debug prints.

* Fix a bug in tagged prints.

* Added a tagged variant of mouse over shader debug print.

* Fix signed/unsigned mismatch errors. Align code (print func params) for better readability.

* Add support for 'bool' type.

* Add bool type for PrintMouseOver variants. Add missing #undef

* Added tag function to create the string tag instead of passing array.
Now you can do:
ShaderDebugPrint(Tag('a','b','c','d'), value);

Or just create a tag and pass it in.

* Improvements to shader header.

Added MouseButtonOver variant which prints value under mouse cursor when left button is pressed.
Added documentation.
Renamed Tag to ShaderDebugTag to avoid possible conflicts.
Overloaded ShaderDebugTag to less than 4 letters.

* Reduce print data buffer size to reduce possibility of editor hang/slowdown.

* Fix math in comment.

* Clarify comment.

* Fix wrong string termination on tags with length < 4

* Fix minor review issues.

* Add CBUFFER macros
* Fix naming of m_OutputBuffers.
* Minor comment fixes.

* Remove lambda allocation.

* Remove unused using.

* Add support to the new InputSystem

* Modularize ShaderDebug output.

+ Comment fixes.

* Modularize ShaderDebug input.

* Move URP integration under define ENABLE_SHADER_DEBUG_PRINT

* Remove Mathematics dependency. Move to Core.

* Fix legacy input.

* Shader debug print comment fixes.

* Review fixes.

Co-authored-by: Samuel Siltanen <[email protected]>
Co-authored-by: Raman Grewal <[email protected]>
@phi-lira
Copy link
Contributor Author

phi-lira commented Dec 13, 2021

  • Universal_Stereo on Win__Standalone_mono_Linear on version trunk - issues introduced in this PR, bisecting 🔴
  • URP_Terrain on Win_DX12_Standalone_XR_mono_Linear on version trunk - issues introduced in this PR, bisecting 🔴
  • URP_Terrain on Win_DX11_Standalone_XR_mono_Linear on version trunk - same as above
  • URP_Terrain on Win_DX11_playmode_XR_mono_Linear on version trunk - licensing issue, rerunning 🟡
  • URP_Terrain on Linux_Vulkan_Standalone_mono_Linear on version trunk - same test fails on master, but the issue in this PR is different, in this PR the decal is rendered pink 🟡 @sandy-carter-unity
  • URP_Terrain on Android_Vulkan_Standalone_il2cpp_Linear on version trunk - also fails on master, but this PR fixes the issue. There's a subtle different in reference image, needs more investigation, perhaps it's just platform differences and the reference image should be updated. 🟡 @sandy-carter-unity
  • URP_PostPro on Win_DX11_playmode_mono_Linear on version trunk - issues introduced in this PR, same failures on all other PostProcessing jobs, bisecting 🔴
  • URP_PostPro on Android_OpenGLES3_Standalone_il2cpp_Linear on version trunk - in addition to failures above, there's one extra failure UniversalGraphicsTests.079_GradingColorAdjustmentsLDR. This was failing in master as well (seems like cyan issue caused by async shader compilation, seems to be fixed in latest master or is instability) 🟡
  • URP_Performance_LostCrypt on Win_DX11_performance_playmode_editor_mono - same as master, problem while importing prefab 🟢
  • URP_Foundation on Win_DX11_playmode_mono_Linear on version trunk - failures introduced in this PR, bisecting 🔴
  • URP_Foundation on Win_DX11_Standalone_XR_mono_Linear on version trunk - [failures introduced in this PR](URP_Foundation on Win_DX11_Standalone_XR_mono_Linear on version trunk), bisecting 🔴
  • URP_Lighting on Win_DX11_playmode_XR_mono_Linear on version trunk - Failures introduced in this PR , bisecting 🔴
  • ShaderGraph_Stereo on Win__Standalone_mono_Linear on version trunk, failures introduced in this PR, bisecting 🔴

manuele-bonanno and others added 2 commits December 14, 2021 09:39
# Conflicts:
#	TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/9601_SkinnedMeshBatching-Off.png
#	TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/9602_SkinnedMeshBatching-On.png
#	com.unity.render-pipelines.universal/CHANGELOG.md
@phi-lira phi-lira merged commit 9cba459 into master Dec 14, 2021
@ernestasKupciunas
Copy link

Post merge review:
Seems alright. We have tested a few PRs manually:
#6423
#6178
Testing doc: https://docs.google.com/document/d/1l536oqerdT1M-OJcy-ynjDCpf0IMPLGtdO0LZHnYdRI/edit#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.