Skip to content

Conversation

@kecho
Copy link
Contributor

@kecho kecho commented Apr 27, 2021

Purpose of this PR

Fixing fogbugs: https://fogbugz.unity3d.com/f/cases/1324000/
Unlit emissive was too dark, because there was a missing pre exposure multiplication.

Repro steps :

  • Open attached project
  • Open SampleScene_Exposure0
  • Notice that both lit and unlit ray traced reflection looked similar
  • Now open SampleScene_Exposure_12
  • It's the same scene with fixed exposure of 12, HDRI sky exposed to 12 and higher intensity dir light

Expected : Same result as the non exposed scene
Result : Unlit emissive is black.

Before:
image

After:
image


Testing status

  • Tested with many levels of exposure in the unlit material, and now the material behaves correctly.
  • Tested on PC with auto exposure and several fixed exposure values.
  • Running all platforms tests (DXR and standard). Likely we might need screenshot update.

@kecho kecho requested a review from sebastienlagarde April 27, 2021 16:40
@kecho kecho force-pushed the HDRP/FixRaytracingUnlitEmissiveExposure branch from c0fdc01 to 0414ba7 Compare April 27, 2021 16:42
@kecho kecho requested a review from a team April 27, 2021 16:45
@sebastienlagarde sebastienlagarde requested review from remi-chapelain and removed request for a team April 27, 2021 18:10
@sebastienlagarde
Copy link
Contributor

@remi-chapelain can you ensure this is cover in one of our test. Also guess we need to check for both unlit with emissive and lit with emissive.

@sebastienlagarde
Copy link
Contributor

@kecho in your test, is your mesh emissive only or does it have a color + emissive contribution? (we should check the later if not check)

@kecho
Copy link
Contributor Author

kecho commented Apr 27, 2021

@kecho in your test, is your mesh emissive only or does it have a color + emissive contribution? (we should check the later if not check)

My test is emissive only, black color. I did test with color as well and looked correct.

@remi-chapelain
Copy link
Contributor

I'll add a test in DXR Test project in this PR as stated in the bug and take care of screenshots if some needs updating.

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.

Verified the fix quickly.

Added 4 tests to cover reflections of emissive

  • Low exposure perf mode
  • high exposure perf mode
  • Low exposure quality mode
  • high exposure quality mode

108_ReflectionEmissive_Perf_Exposure_0

108_ReflectionEmissive_Quality_Exposure_0

High and low exposure look the same because the value of emissive and sun are adjusted accordingly. Only noticeable difference is the reflection resolution in performance vs quality;

Ran all DXR Tests locally (All 🟢, which proved we didn't have proper coverage for this) since yamato is overloaded, I'd say we're good to merge without testing remotely

@sebastienlagarde sebastienlagarde marked this pull request as ready for review April 28, 2021 10:39
@sebastienlagarde sebastienlagarde merged commit f33d33c into hd/bugfix Apr 28, 2021
@sebastienlagarde sebastienlagarde deleted the HDRP/FixRaytracingUnlitEmissiveExposure branch April 28, 2021 10:40
sebastienlagarde added a commit that referenced this pull request Apr 30, 2021
* Fix null exception on Raytracing SSS volume component (#4322)

* Add null check

* changelog

* Fix issue with Eye shader and area light (#4310)

* Fix Ray Tracing Light Cluster debug mode (#4327)

* Remove unneeded position from input layout of light cluster

* Changelog

Co-authored-by: sebastienlagarde <[email protected]>

* Skip adding the LOD's renderer to the checked renderer if it's null (#4313)

* Skip adding the LOD's renderer to the checked renderer if it's null

* changelog

* Add LODgroup missing renderer to "check scene content for ray tracing"

* formatting test

* formatting

Co-authored-by: sebastienlagarde <[email protected]>

* Update doc of transparent motion vectors to specify TAA of object behind will be impacted (#4325)

* Update doc

* Fix doc

* Fixed Look Dev breaking when docked and rendered at zero size. (#4331)

* Fixed an issue where sometime a docked lookdev could be rendered at zero size and break.

* Update changelog

# Conflicts:
#	com.unity.render-pipelines.high-definition/CHANGELOG.md

Co-authored-by: sebastienlagarde <[email protected]>

* [HDRP] Added a bit about scaling issues when dealing with history buffers (#4333)

* Updated troubleshooting custom pass doc

* Update Custom-Pass-Troubleshooting.md

* Fixed an issue where runtime debug window UI would leak game objects. (#4337)

* Fixed an issue where runtime debug window UI would leak game objects.

* Update changelog

* Updated documentation to support #4313 (#4336)

Co-authored-by: Sebastien Lagarde <[email protected]>

* Fixed NaNs when denoising pixels where the dot product between normal and view direction is near zero (#4342)

Co-authored-by: sebastienlagarde <[email protected]>

* updated tooltip (#4334)

* Doc for custom matrix for fog (#4352)

* [Fogbugz 1324000] Fixing unlit emissive reflections (#4340)

* Fix ray tracing unlit emissive exposure.

Changelog

* Automated tests coverage

* update scenes

Co-authored-by: Remi Chapelain <[email protected]>
Co-authored-by: sebastienlagarde <[email protected]>

* [Fogbugz 1329173] Fixing wrong pyramid color dimensions when hardware DRS is on. (#4346)

* Fixing bad pyramid color source texture size. DRS hanlder must be queried since the mip levels depend on the source hardware resolution

* Changelog

Co-authored-by: sebastienlagarde <[email protected]>

* Fix RTHandle scale bias [1329977] (#4320)

* Fix RTHandle scale bias

* Add changelog

* Fix history sacle

* Fix

Co-authored-by: sebastienlagarde <[email protected]>

* Fixed emission material properties not being animable (#4366)

* Fixed emission material properties not being animable

* Updated changelog

Co-authored-by: sebastienlagarde <[email protected]>

* Fix fog precision (#4364)

Co-authored-by: sebastienlagarde <[email protected]>

* Fix erroneous tile coordinate calculations in contact shadows (#4335)

* Fix wrong tile coord calculations

* Changelog

* Update test scene for contact shadow to cover data

* update references screenshots

Co-authored-by: Sebastien Lagarde <[email protected]>

* [HDRP]Fix history buffer allocation for AOVs when the request does not come in first frame (#4361)

* Fix  history buffer allocation for AOVs when the request does not come in first frame

* Add a break in the for loop

Co-authored-by: sebastienlagarde <[email protected]>

* Fix for volumetric clouds performing Read and Write on same texture [Unsupported on some platforms] (#4356)

* Fix for usage of camera color RW when not supported.

* Re-enable on metal

* changelog

Co-authored-by: sebastienlagarde <[email protected]>

* Update TestCaseFilters.asset

* update metal screenshots

* missing meta

* [Fogbugz 1330769] Fixing bloom bicubic filtering for DRS (#4370)

* Fixing bloom bicubic filtering for DRS, bicubic was using the wrong dimensions / texel sizes

* Adding better comment to explain offseting of bicubic texture offset fix

* update reference screenshots

Co-authored-by: sebastienlagarde <[email protected]>

Co-authored-by: FrancescoC-unity <[email protected]>
Co-authored-by: Rémi Chapelain <[email protected]>
Co-authored-by: JulienIgnace-Unity <[email protected]>
Co-authored-by: Antoine Lelievre <[email protected]>
Co-authored-by: Lewis Jordan <[email protected]>
Co-authored-by: Pavlos Mavridis <[email protected]>
Co-authored-by: Adrien de Tocqueville <[email protected]>
Co-authored-by: Kleber Garcia <[email protected]>
Co-authored-by: Remi Chapelain <[email protected]>
Co-authored-by: skhiat <[email protected]>
sebastienlagarde added a commit that referenced this pull request Apr 30, 2021
* Added define for new reflection probe API update (case 1290521)

* Updated changelog

* Fix null exception on Raytracing SSS volume component (#4322)

* Add null check

* changelog

* Fix issue with Eye shader and area light (#4310)

* Fix Ray Tracing Light Cluster debug mode (#4327)

* Remove unneeded position from input layout of light cluster

* Changelog

Co-authored-by: sebastienlagarde <[email protected]>

* Skip adding the LOD's renderer to the checked renderer if it's null (#4313)

* Skip adding the LOD's renderer to the checked renderer if it's null

* changelog

* Add LODgroup missing renderer to "check scene content for ray tracing"

* formatting test

* formatting

Co-authored-by: sebastienlagarde <[email protected]>

* Update doc of transparent motion vectors to specify TAA of object behind will be impacted (#4325)

* Update doc

* Fix doc

* Fixed Look Dev breaking when docked and rendered at zero size. (#4331)

* Fixed an issue where sometime a docked lookdev could be rendered at zero size and break.

* Update changelog

# Conflicts:
#	com.unity.render-pipelines.high-definition/CHANGELOG.md

Co-authored-by: sebastienlagarde <[email protected]>

* [HDRP] Added a bit about scaling issues when dealing with history buffers (#4333)

* Updated troubleshooting custom pass doc

* Update Custom-Pass-Troubleshooting.md

* Fixed an issue where runtime debug window UI would leak game objects. (#4337)

* Fixed an issue where runtime debug window UI would leak game objects.

* Update changelog

* Updated documentation to support #4313 (#4336)

Co-authored-by: Sebastien Lagarde <[email protected]>

* Fixed NaNs when denoising pixels where the dot product between normal and view direction is near zero (#4342)

Co-authored-by: sebastienlagarde <[email protected]>

* updated tooltip (#4334)

* Doc for custom matrix for fog (#4352)

* [Fogbugz 1324000] Fixing unlit emissive reflections (#4340)

* Fix ray tracing unlit emissive exposure.

Changelog

* Automated tests coverage

* update scenes

Co-authored-by: Remi Chapelain <[email protected]>
Co-authored-by: sebastienlagarde <[email protected]>

* [Fogbugz 1329173] Fixing wrong pyramid color dimensions when hardware DRS is on. (#4346)

* Fixing bad pyramid color source texture size. DRS hanlder must be queried since the mip levels depend on the source hardware resolution

* Changelog

Co-authored-by: sebastienlagarde <[email protected]>

Co-authored-by: FrancescoC-unity <[email protected]>
Co-authored-by: sebastienlagarde <[email protected]>
Co-authored-by: Rémi Chapelain <[email protected]>
Co-authored-by: JulienIgnace-Unity <[email protected]>
Co-authored-by: Antoine Lelievre <[email protected]>
Co-authored-by: Lewis Jordan <[email protected]>
Co-authored-by: Pavlos Mavridis <[email protected]>
Co-authored-by: Adrien de Tocqueville <[email protected]>
Co-authored-by: Kleber Garcia <[email protected]>
Co-authored-by: Remi Chapelain <[email protected]>
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