Skip to content

Remove deprecated UNITY_USE_NATIVE_HDR keyword from shader code. #5569

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

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

pema99
Copy link
Contributor

@pema99 pema99 commented Sep 8, 2021


Purpose of this PR

This trunk PR: https://ono.unity3d.com/unity/unity/pull-request/131380/_/lighting/reflection-probe-encoding3 deprecates the UNITY_USE_NATIVE_HDR keyword. This keyword hasn't been used in many years and has essentially been dead code for the majority of its existence. Thus, it is fine to remove from shader code. A slack thread discussing this is here: https://unity.slack.com/archives/C89KFUUCT/p1629800292148400


Testing status

No automated testing other than that in the trunk PR. I've verified manually that the shaders still compile, and that the setting added in the trunk PR functions with URP.

@pema99 pema99 requested a review from phi-lira September 8, 2021 14:20
@github-actions
Copy link

github-actions bot commented Sep 8, 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)

URP
/.yamato%252Fall-urp.yml%2523PR_URP_trunk

Shader Graph
/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_trunk
Depending on your PR, you may also want
/.yamato%252Fall-shadergraph_builtin_foundation.yml%2523PR_ShaderGraph_BuiltIn_Foundation_trunk
/.yamato%252Fall-shadergraph_builtin_lighting.yml%2523PR_ShaderGraph_BuiltIn_Lighting_trunk

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.

@phi-lira phi-lira marked this pull request as ready for review September 29, 2021 12:58
@phi-lira phi-lira requested review from a team as code owners September 29, 2021 12:58
Copy link
Contributor

@esmelusina esmelusina left a comment

Choose a reason for hiding this comment

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

LGTM

@pema99
Copy link
Contributor Author

pema99 commented Oct 8, 2021

Still need approval from shader-graph code owner. Did you mean to approve @esmelusina or are you holding off?

@phi-lira phi-lira changed the base branch from master to universal/staging October 12, 2021 09:39
@phi-lira
Copy link
Contributor

Merging, based on @esmelusina comment this is approved.

@phi-lira phi-lira merged commit fe61d65 into universal/staging Oct 12, 2021
@phi-lira phi-lira deleted the lighting/remove-unity-use-native-hdr branch October 12, 2021 09:39
@phi-lira phi-lira mentioned this pull request Oct 12, 2021
@phi-lira phi-lira restored the lighting/remove-unity-use-native-hdr branch October 18, 2021 15:13
@phi-lira phi-lira deleted the lighting/remove-unity-use-native-hdr branch October 18, 2021 15:18
phi-lira added a commit that referenced this pull request Oct 18, 2021
commit 9d204fb
Author: pema99 <pemamalling@gmail.com>
Date:   Wed Sep 8 16:15:36 2021 +0200

    Remove deprecated UNITY_USE_NATIVE_HDR keyword from shader code.
@phi-lira phi-lira mentioned this pull request Oct 18, 2021
odbb added a commit that referenced this pull request Oct 19, 2021
* master:
  Enable iris normal for Eye shader (#5880)
  Update to HDRP Asset analytics (#6060)
  [HDPR] Update reference screenshots for Linux Vulkan
  Update 206_Motion_Vectors.png (#6046)
  Updated code owner for URP (#6052)
  [URP] Re-enable ios pbr tests #5983
  Fix error when using gizmos with camera stack in editor #5913
  emitting UI geometry for offscreen cameras too (case 1344969 fix) #5894
  Remove deprecated UNITY_USE_NATIVE_HDR keyword from shader code. #5569
  [XR][URP] Fix issue with vignette location in XR #5471 #5471
ellioman added a commit that referenced this pull request Jan 10, 2022
* Fix for specular color plus a first draft of a test scene for it

* Minor color updates

* Test updated

* Adding Directional Light

* Adding the new test scene to build settings

* Reference Images

* Redoing the specular bugfix after various changes happened on Master

* Adding a Deferred Test Scene

* Fixing Specular on Deferred and adding a test scene for it as well

* Same fix but in ShaderGraph shaders

* Filtering out the 011 deferred scene for Android Vulkan (Issue: 1340634) and updating three reference images

* D3D11 updated reference image.

* Set a valid stencil format when creating depthStencil render-target.

* D3D12 reference image

* D3D11 reference image

* DX11 Deferred Reference image

* Removing a scene from the testcase filters as the issue has been resolved

* Changelog

* [XR][URP] Fix issue with vignette location in XR (#5471)

* [XR][URP] Fix issue with vignette location in XR

Vignette center needs to respect the real view center since in XR, with asymmetric FOV, the center of the render taget is not always the center of the view. We deduce the real center via the projection matrix data and use that to offset the vignette's center.

* Updated changelog

* Extracted comon XRView code into ComputeEyeCenterUV & Allow more than 2 XR views

* Fix vignette movement direction for XR when whe change the vignette "center" parameter

* Returning to 2 views only for XR vignette.

This will keep the shader as simple as possible, if we need to support more views in the future, we can restore this code

* Use "Vector4.zero" instead of "new Vector4(0.0f, 0.0f, 0.0f, 0.0f)"

* Only set v3 if we are using single pass

That variable is only needed if single-pass instancing/multiview is active, so we can simplify the code to only do the asymetric FOV correction when we are in multi-pass mode.

* More improvements

- Renamed _Vignette_Params3 to _Vignette_ParamsXR
- Moved all single-pass XR values in _Vignette_ParamsXR
- Extracted code to correct eye center to XRPass class

* Adding a comment to describe what ApplyXRViewCenterOffset does

* Quick fix a comment that is not right anymore after moving the code

* Remove deprecated UNITY_USE_NATIVE_HDR keyword from shader code. (#5569)

* Fix error when using gizmos with camera stack in editor (#5913)

* Fix game window gizmos when camera stack is used

* Remove Assert check for the last camera in stack

* Add lastCameraInStack check

* Updating WindowsEditor DX11 reference image

* Updating Android Vulkan & iOS Metal reference images. Upping the threshold a tiny bit.

* Trying a new reference image for WinPlayer DX11 & DX12

* Disabling XR capability for the new test as it breaks due to the Development Build label.

* Updating reference images for VFX due to the changes done with my fix.

* Changelog

* Updating materials

* Updating reference images for VFX OSX Editor on Metal

Co-authored-by: Andrem <andrem@unity3d.com>
Co-authored-by: Kay Chang <kaychang@unity3d.com>
Co-authored-by: Marc-Andre Loyer <82059196+maloyer-unity@users.noreply.github.com>
Co-authored-by: Pema Malling <pema99@users.noreply.github.com>
Co-authored-by: Tomas Zigmantavičius <30701728+tomzig16@users.noreply.github.com>
Co-authored-by: Felipe Lira <felipedrl@gmail.com>
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.

4 participants