Skip to content

Add scale parameter in eye shader #6132

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 8 commits into from
Nov 4, 2021
Merged

Conversation

adrien-de-tocqueville
Copy link
Contributor

@adrien-de-tocqueville adrien-de-tocqueville commented Oct 25, 2021

Purpose of this PR

https://fogbugz.unity3d.com/f/cases/1371406/

Added a scale parameter in the HDRP Eye shader graph to counter eye shell import scale. It works by multiplying the object space position by a scale factor
The bug report suggested exposing multiple parameters to manually balance the scale factor.
This can be done more easily by adding a scale parameter, but maybe exposing the other parameters has an interest too ?

Currently the new parameter is visible, we can make it non exposed and leave it for users that want to edit the graph
image

Screnshot with new shader: left and right are now identical
image


Testing status

See screenshot above

Launched yamato


Comments to reviewers

Please give feedback about whether this solution is better than exposing iris size / plane offset
Also, should we make the new parameter exposed by default ?

@adrien-de-tocqueville adrien-de-tocqueville requested a review from a team October 25, 2021 15:15
@github-actions
Copy link

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)

HDRP
/jobDefinition/.yamato%2Fall-hdrp.yml%23PR_HDRP_trunk
With changes to HDRP packages, you should also run
/jobDefinition/.yamato%2Fall-lightmapping.yml%23PR_Lightmapping_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.

@anisunity
Copy link
Contributor

A geometry section would be nice! @adrien-de-tocqueville

Copy link
Contributor

@anisunity anisunity left a comment

Choose a reason for hiding this comment

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

A geometry section in the shader would be nice, also didn't open it, so I don't know if the result is 100% the same, would be worth adding a test that checks that.

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.

Change is great, it now allows users to have an import scale different than 1 ✔️
As @anisunity said, it would be great to have a geometry section since everything is already in a section here.

I checked and the result is basically identical depending on the scale.

6e5ca08851b018cfd48d5897d2797708.mp4

Now for the changes, that would be great to duplicate those changes in the HDRP Material sample. Basically the graph is duplicated here

Also, there's already two tests that uses this graph (one in HDRP_Tests and one in HDRP_DXR_Tests project.
Would be cool if those were updated as well

@adrien-de-tocqueville
Copy link
Contributor Author

Moved it to a new geomtry section
image

Updated the 3 duplicates mentionned by rémi

For the test, not sure how to test they are similar, so I updated test 1501 to have one row use a 0.5 scaled mesh with a scaled shader. So the resulting image should not have changed

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.

Thanks for the changes !
Looks good to me ✔️

@adrien-de-tocqueville adrien-de-tocqueville marked this pull request as ready for review November 3, 2021 11:10
@sebastienlagarde
Copy link
Contributor

@AdrienDeTocqueville Please update documentation

sebastienlagarde pushed a commit that referenced this pull request Nov 7, 2021
sebastienlagarde added a commit that referenced this pull request Nov 7, 2021
* Increasing HDRP fined pruned light tile count to 63. #5771

* Fix Upscaled Film Grain & Dither in HDRP (#6111)

When using particular types of upscaling, (CAS, FSR, Catmull) the
film grain quality produced by HDRP was lower than expected.

This was caused by errors in the UV scale calculations for the grain
texture.

This change fixes the issue by modifying the scale calculations to
use the final viewport size rather than the size of the current
scaled/unscaled viewport. This works because film grain is always
handled by "FinalPass" which always renders at final viewport size
anyways.

This change also fixes a few cases where the current resolution group
would have been incorrect when CAS or FSR were being used as the
upscaling method.

* Update CHANGELOG.md

* Fix regression that was introduced in a previous PR on the diffuse denoiser #6119

* Fix Light Loop Variant Warnings (1372256) #6135

* Bump the HDRP Template IET Framework Package Version #6134

* Update ray tracing and path tracing docs regarding custom interpolator limitations (#6126)

* [HDRP] Disable DoF for orthographic cameras #6124

* update occlusion radius for directional light sample (#6154)

Co-authored-by: Sean Puller <sean.puller@unity3d.com>

* Clean up Public API Documentation #6151

* Fix Sky override not taken into account #6127

* [Fogbugz # 1372245] Hdrp/drs fixing pyramid blur #6136

* Improved Area Light Support for Hair (#6157)

* Initial commit MRP implementation

* Barn door application

* Add dominant marschner lobe direction skeleton

* Finalize rect light MRP for marschner, handle forward + backward hemisphere scattering.

* Force pathtracer to far-field in case users use geometry with bad normals.

* com.unity.render-pipelines.high-definition/Runtime/Material/Hair/MultipleScattering/HairMultipleScattering.hlsl

* Fix SH ringing for multiple scattering

* Add trivial support for cookies

* Add Kajiya support for area light approximation (non-LTC)

* remove Line area light MRP for now

* Remove area rect reference

* Update area light hair test scene and reference images

* Select cookie mip based on solid angle, rename some functions, temporarily add back rect ref

* Remove the useless div-by-1 and add a comment to explain the removal of the divide by PI

* Add a comment to further explain the normalization we do on the longitudinal distribution

* Remove the ref once again

* Update test images for metal and vulkan

* Add a zero-div guard to silence compiler warning

* Update CHANGELOG.md

* [HDRP][Path Tracing] Exposed 3 methods related to path tracing and accumulation. #6197

* [HDRP] Fix infitnite material import loop materials #6185

* fixed typo: users -> uses (#6162)

* Don't blur if nothing to blur (saves memory due to RG) (#6183)

* Fix local fog volumes z axis calculation #6068

* fixed passive voice (#6092)

* Fixed grammar errors

* fixed passive voice in decal doc

* Update Decal.md

* Update Decal.md

* Update Decal.md

* AxF Raytracing: fix performance mode distillation that was broken and removed in #9d6db83478c213bc066e5f728d94b7faa6662543 (#6104)

* Add scale parameter in eye shader #6132

* updated Override Fog page (#6200)

* updated fog override screenshot

* changed Depth Extent to Volumetric Fog Distance

* Fix missing pragma (#6204)

* [HDRP] Fix custom pass motion vector texture access #6205

* Fix typo in MipBias tooltip in HDRenderPipelineUI.Skin (#6210)

* Replace gizmos FindObjectsOfType with list registrations to avoid constant slowdown in large scenes. Merged editor guards blocks. (#6168)

* [HDRP] Fix APV tooltip for Geometry Distance Offset (#6150)

* Update tooltip

* Update ProbeVolumeUI.Skin.cs

* Fixed the point distribution for the diffuse denoiser sometimes not being properly intialized. #6194

* Fixed the bad blending between the sun and the clouds (case 1373282). #6193

* Fix shadow mask fade and optimize it at same time (#6083)

* [HDRP][Path Tracing] Minor fix for SSS when combined with fog (#6215)

* Minor fix for SSS + fog.

* Comments.

* Update 1401_HairGraph_Area_Light.png

* update screenshots

Co-authored-by: Kleber Garcia <kleber.garcia@unity3d.com>
Co-authored-by: gmitrano-unity <89797527+gmitrano-unity@users.noreply.github.com>
Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com>
Co-authored-by: John Parsaie <johnpa@unity3d.com>
Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
Co-authored-by: Sean Puller <43151199+SeanPuller@users.noreply.github.com>
Co-authored-by: Sean Puller <sean.puller@unity3d.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org>
Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Co-authored-by: emilybrown1 <88374601+emilybrown1@users.noreply.github.com>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: RemyUnity <32760367+RemyUnity@users.noreply.github.com>
Co-authored-by: slunity <37302815+slunity@users.noreply.github.com>
Co-authored-by: James-Burr-Unity <61244495+James-Burr-Unity@users.noreply.github.com>
Co-authored-by: Torbjorn Laedre <271210+tlaedre@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
Development

Successfully merging this pull request may close these issues.

4 participants