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

[VFX] HDRP Decal Output #4601

Merged
merged 83 commits into from
Jul 13, 2021
Merged

[VFX] HDRP Decal Output #4601

merged 83 commits into from
Jul 13, 2021

Conversation

ludovic-theobald
Copy link
Contributor

@ludovic-theobald ludovic-theobald commented May 21, 2021

[VFX] HDRP Decal Output

Design Doc

Checklist for PR maker

  • Have you added a backport label (if needed)? For example, the need-backport-* label. After you backport the PR, the label changes to backported-*.
  • Have you updated the changelog? Each package has a CHANGELOG.md file.
  • Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR. If you do add documentation, make sure to add the relevant Graphics Docs team member as a reviewer of the PR. If you are not sure which person to add, see the Docs team contacts sheet.
  • Have you added a graphic test for your PR (if needed)? When you add a new feature, or discover a bug that tests don't cover, please add a graphic test.

Purpose of this PR

We want to be able to output decals that affect not only the base color, but also the other physical properties of the affected material (Normal, Smoothness, Metallic, AO).
The goal is to match as much as possible the features available for the HDRP decals.
This feature will be HDRP-exclusive.


Testing status

Extensive testing by QA can be found here : https://docs.google.com/document/d/1lAurKH3M2Qbwtq3lb-37yQkn4DWsGsAHKkDTlHEaBZE/edit


Comments to reviewers

At this stage, you need to enable Decal Layers in the HDRP asset for the feature to work. (temporary)

@github-actions github-actions bot added the HDRP label May 21, 2021
@github-actions
Copy link

github-actions bot commented Jul 6, 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://yamato.cds.internal.unity3d.com/jobs/902-Graphics
Search for your PR branch using the sidebar on the left, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

HDRP
/.yamato%252Fall-hdrp.yml%2523PR_HDRP_2021.2

VFX
/.yamato%252Fall-vfx.yml%2523PR_VFX_2021.2

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.

Copy link
Collaborator

@julienf-unity julienf-unity left a comment

Choose a reason for hiding this comment

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

Seems like the new GFX tests wasnt added to the test list for automation.

  • Doc is missing

Apart from that it looks good. Nice work!




//EndTODO
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be removed

@@ -0,0 +1,201 @@

//TODO : Check for unnecessary includes / and for necessary ones
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that still relevant?

// Decal layer of the decal
DecodeFromDecalPrepass(i.pos.xy, material);

if ((decalLayerMask & material.decalLayerMask) == 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes idea is at some point to rely completely on SG for render pipe specific code and simplify/factorize our templates a lot. But we're not there yet

Added Output Particle HDRP Lit Decal doc

Please check Input Types are accurate.
Copy link
Contributor

@Vic-Cooper Vic-Cooper left a comment

Choose a reason for hiding this comment

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

Added documentation. @ludovic-theobald Please double-check the Types are accurate. I also changed the intro based on your suggestion on the google doc.

@ludovic-theobald
Copy link
Contributor Author

Adding @julienamsellem to review the part on the MinMaxSlider.
(VFXMinMaxSliderField.cs + Vector2PropertyRM.cs + VFXControls.uss)

Copy link
Contributor

@julienamsellem julienamsellem left a comment

Choose a reason for hiding this comment

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

All good for me

@ludovic-theobald ludovic-theobald merged commit f4702b4 into master Jul 13, 2021
@ludovic-theobald ludovic-theobald deleted the vfx/feature/hdrp-decals branch July 13, 2021 10:26
PaulDemeulenaere added a commit that referenced this pull request Aug 19, 2021
PaulDemeulenaere added a commit that referenced this pull request Aug 24, 2021
This class has been recently introduced by #4601
sebastienlagarde pushed a commit that referenced this pull request Aug 25, 2021
This class has been recently introduced by #4601
julienf-unity added a commit that referenced this pull request Nov 24, 2021
* Use abstraction to compute screen space uv

The URP implementation relies on screen scale & graphics api
See https://github.com/Unity-Technologies/Graphics/blob/b468fa4627d191f06200a0f33df3d9cddee2c3f9/com.unity.render-pipelines.universal/ShaderLibrary/ShaderVariablesFunctions.hlsl#L347

* *Add Graphics Test

* Experiment : Revert Pass.template from #4601

* Enable GraphicTest & add RenderScale

* Revert "Experiment : Revert Pass.template from #4601"

This reverts commit b8bfebb.

* Fix overlay decal

* *Update test Scene

* *Remove 104_Decal_And_SoftParticle (Graphic Test can't capture correctly overlay when there is a renderScale)

* Remove unexpected "if (_ProjectionParams.x < 0)" & Update ChangeLog

In discussion with @ludovic-theobald about this behavior.

* Restore actually correct _ProjectionParams.x test

There is probably something wrong in SetPerCameraShaderVariables

* Revert change in URP

* Minor: Apply suggestion from @julienf

#5401 (comment)

* Unexpected change in changelog

* Unexpected modification in CHANGELOG.md

* Fix changelog ordering

Co-authored-by: julienf-unity <julienf@unity3D.com>
PaulDemeulenaere added a commit that referenced this pull request Dec 13, 2021
* Use abstraction to compute screen space uv

The URP implementation relies on screen scale & graphics api
See https://github.com/Unity-Technologies/Graphics/blob/b468fa4627d191f06200a0f33df3d9cddee2c3f9/com.unity.render-pipelines.universal/ShaderLibrary/ShaderVariablesFunctions.hlsl#L347

* *Add Graphics Test

* Experiment : Revert Pass.template from #4601

* Enable GraphicTest & add RenderScale

* Revert "Experiment : Revert Pass.template from #4601"

This reverts commit b8bfebb.

* Fix overlay decal

* *Update test Scene

* *Remove 104_Decal_And_SoftParticle (Graphic Test can't capture correctly overlay when there is a renderScale)

* Remove unexpected "if (_ProjectionParams.x < 0)" & Update ChangeLog

In discussion with @ludovic-theobald about this behavior.

* Restore actually correct _ProjectionParams.x test

There is probably something wrong in SetPerCameraShaderVariables

* Revert change in URP

* Minor: Apply suggestion from @julienf

#5401 (comment)

* Unexpected change in changelog

* Unexpected modification in CHANGELOG.md

* Fix changelog ordering

Co-authored-by: julienf-unity <julienf@unity3D.com>
# Conflicts:
#	com.unity.render-pipelines.universal/CHANGELOG.md
sebastienlagarde pushed a commit that referenced this pull request Jan 13, 2022
* Use abstraction to compute screen space uv

The URP implementation relies on screen scale & graphics api
See https://github.com/Unity-Technologies/Graphics/blob/b468fa4627d191f06200a0f33df3d9cddee2c3f9/com.unity.render-pipelines.universal/ShaderLibrary/ShaderVariablesFunctions.hlsl#L347

* *Add Graphics Test

* Experiment : Revert Pass.template from #4601

* Enable GraphicTest & add RenderScale

* Revert "Experiment : Revert Pass.template from #4601"

This reverts commit b8bfebb.

* Fix overlay decal

* *Update test Scene

* *Remove 104_Decal_And_SoftParticle (Graphic Test can't capture correctly overlay when there is a renderScale)

* Remove unexpected "if (_ProjectionParams.x < 0)" & Update ChangeLog

In discussion with @ludovic-theobald about this behavior.

* Restore actually correct _ProjectionParams.x test

There is probably something wrong in SetPerCameraShaderVariables

* Revert change in URP

* Minor: Apply suggestion from @julienf

#5401 (comment)

* Unexpected change in changelog

* Unexpected modification in CHANGELOG.md

* Fix changelog ordering

Co-authored-by: julienf-unity <julienf@unity3D.com>
# Conflicts:
#	com.unity.render-pipelines.universal/CHANGELOG.md
unity-emilk pushed a commit that referenced this pull request Jun 10, 2022
https://jira.unity3d.com/browse/UUM-2115

When one component of a Vector2 node was set to indeterminate value the other component was not set to indeterminate.
![Unity_0MhemJIp02](https://media.github.cds.internal.unity3d.com/user/4003/files/f8c486cc-e33d-445a-bc75-570afb84ad2a)

This regression has been introduced by this [PR](#4601)
matteblair pushed a commit to Pontoco/Graphics that referenced this pull request Sep 7, 2022
https://jira.unity3d.com/browse/UUM-6665
Original PR: https://github.cds.internal.unity3d.com/unity/unity/pull/11138

When one component of a Vector2 node was set to indeterminate value the other component was not set to indeterminate.
![Unity_0MhemJIp02](https://media.github.cds.internal.unity3d.com/user/4003/files/f8c486cc-e33d-445a-bc75-570afb84ad2a)

This regression has been introduced by this [PR](Unity-Technologies#4601)
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.

9 participants