-
Notifications
You must be signed in to change notification settings - Fork 860
Fixed an exception occuring when a camera doesn't have an HDAdditionalCameraData (1254383). #846
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
Conversation
…lCameraData (1254383).
|
Not sure if i should backport this. |
TomasKiniulis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work great. Not encountering AssertionExceptions anymore when resetting Camera without Additional Camera Data and with Render Pipeline asset unassigned
RSlysz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must handle case where HDRP is installed but not used to mimic the built-in reset here.
| // Grab the current HDRP asset, we should not be executing this code if HDRP is null | ||
| var hdrp = (RenderPipelineManager.currentPipeline as HDRenderPipeline); | ||
| if (hdrp == null) | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can have a better workflow here.
If there is HDRP package but no HDAdditionalCameraData sibling, we do nothing with your solution. But basically the user want here to reset its camera that is not a HDRP one no?
Also if you have an HDAdditionalCameraData but the current SRP is not the HDRP one, a built-in Camera should be displayed. But this camera Reset contextual menu command should still perform the reset.
So I think, if I not mistaken that we should call camera.Reset(); before returning.
|
It seams thta this have been fixed on a higher level. I remember having to do a contextual menu dispatcher for the "remove component". But quick pairing with Tomas and it seams there is no conflict here with the Reset |
RSlysz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Adding purge of unused resources in render graph. (#872) * First round of auto-exposure docs updates (#858) * start of volume docs (need switching branch) * moar docs * Reviewed exposure override * Reviewed render pipeline debug window doc and changed some formatting * Changed html links to md * Update HDRP-Camera.md * Removed rogue space * Small changes to the exposure page Co-authored-by: Lewis Jordan <[email protected]> * Fix depth offset and transparent motion vector for unlit transparent (#896) * Fix depth offset and transparent motion vector for unlit transparent * cleanup and fix the shadow pre/post alpha clip * Fixed an exception occuring when a camera doesn't have an HDAdditionalCameraData (1254383). (#846) Co-authored-by: sebastienlagarde <[email protected]> * Fix Generates Include command issue with Physically Based Sky (#908) * Split GenerateHLSL code from PhysicallyBasedSkyRenderer in a separate file to fix Generator Includes tool * Update ShaderVariablesPhysicallyBasedSky.cs.hlsl * Fix ray tracing with XR single-pass (#891) * removed warnings related to ray binning in XR * fix RenderRayTracedReflections with XR * add errors if Path Tracing is used with XR single-pass * add missing shader macros * add entry to changelog Co-authored-by: sebastienlagarde <[email protected]> * Hdrp/clean shader stacks fields (#906) * Cleanup the HD fields * Fix distortion appearing two times in the UI * Pbr sky fixes metal (#911) * Split GenerateHLSL code from PhysicallyBasedSkyRenderer in a separate file to fix Generator Includes tool * Update ShaderVariablesPhysicallyBasedSky.cs.hlsl * Fix constant buffer layout for physically based sky - Update Vector3 to Vector4 to reflect actual padding/layout for non-DX platforms (both are 16 bytes in the shader space, but 12 bytes in C#) - Updates to shader code to reference only the float3 data being set up * Update references screenshots Co-authored-by: Sebastien Lagarde <[email protected]> Co-authored-by: JulienIgnace-Unity <[email protected]> Co-authored-by: FrancescoC-unity <[email protected]> Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: anisunity <[email protected]> Co-authored-by: Fabien Houlmann <[email protected]> Co-authored-by: Antoine Lelievre <[email protected]> Co-authored-by: Jesse Barker <[email protected]>
* Adding purge of unused resources in render graph. (#872) * First round of auto-exposure docs updates (#858) * start of volume docs (need switching branch) * moar docs * Reviewed exposure override * Reviewed render pipeline debug window doc and changed some formatting * Changed html links to md * Update HDRP-Camera.md * Removed rogue space * Small changes to the exposure page Co-authored-by: Lewis Jordan <[email protected]> * Fix depth offset and transparent motion vector for unlit transparent (#896) * Fix depth offset and transparent motion vector for unlit transparent * cleanup and fix the shadow pre/post alpha clip * Fixed an exception occuring when a camera doesn't have an HDAdditionalCameraData (1254383). (#846) Co-authored-by: sebastienlagarde <[email protected]> * Fix Generates Include command issue with Physically Based Sky (#908) * Split GenerateHLSL code from PhysicallyBasedSkyRenderer in a separate file to fix Generator Includes tool * Update ShaderVariablesPhysicallyBasedSky.cs.hlsl * Fix ray tracing with XR single-pass (#891) * removed warnings related to ray binning in XR * fix RenderRayTracedReflections with XR * add errors if Path Tracing is used with XR single-pass * add missing shader macros * add entry to changelog Co-authored-by: sebastienlagarde <[email protected]> * Hdrp/clean shader stacks fields (#906) * Cleanup the HD fields * Fix distortion appearing two times in the UI * Pbr sky fixes metal (#911) * Split GenerateHLSL code from PhysicallyBasedSkyRenderer in a separate file to fix Generator Includes tool * Update ShaderVariablesPhysicallyBasedSky.cs.hlsl * Fix constant buffer layout for physically based sky - Update Vector3 to Vector4 to reflect actual padding/layout for non-DX platforms (both are 16 bytes in the shader space, but 12 bytes in C#) - Updates to shader code to reference only the float3 data being set up * Update references screenshots Co-authored-by: Sebastien Lagarde <[email protected]> * Cleaun shader config for shadow (#917) * Move HDShadowFilteringQuality to main package as it is not used anymore * Update Upgrading-from-2020.1-to-2020.2.md * Add comment for _IncludeIndirectLighting for emissive mesh and clean ShaderPas template code * Fix shader warning * Fix shader config in DXR projects * Fix warnings (#920) * Enable render graph test (#873) * re revert the PR * Fixed planar probes with render graph. * Fixed an issue with msaa resolve pass when movecs aren't enabled. Co-authored-by: Julien Ignace <[email protected]> * Add light layer on indirect lighting controller (#777) * Add support for reflection controller. * Fix compilation * Fixed compilation issue and naming * Fixed compilation issue and naming * Update IndirectLightingControllerEditor.cs * Update CHANGELOG.md * Update Override-Indirect-Lighting-Controller.md * Update Override-Indirect-Lighting-Controller.md * Update Override-Indirect-Lighting-Controller.md * Update. Indirect controller also affect planar Co-authored-by: Sebastien Lagarde <[email protected]> * Update IndirectLightingController.cs * Compute shader stripping (#919) * Compute shader stripping * changelog Co-authored-by: sebastienlagarde <[email protected]> * Enable DXR automated tests for XR (#915) * disable unsupported dxr tests in xr * enable dxr tests in xr on Yamato * add HDRP_DXR playmode_XR to ABV * Change guards around ESRAM code (#922) * Change unity version guards for ESRAM * move commas * Bump min version (#923) * Add a comment about packing float3/float4 Co-authored-by: JulienIgnace-Unity <[email protected]> Co-authored-by: FrancescoC-unity <[email protected]> Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: anisunity <[email protected]> Co-authored-by: Fabien Houlmann <[email protected]> Co-authored-by: Antoine Lelievre <[email protected]> Co-authored-by: Jesse Barker <[email protected]> Co-authored-by: Evgenii Golubev <[email protected]>
* Adding purge of unused resources in render graph. (#872) * First round of auto-exposure docs updates (#858) * start of volume docs (need switching branch) * moar docs * Reviewed exposure override * Reviewed render pipeline debug window doc and changed some formatting * Changed html links to md * Update HDRP-Camera.md * Removed rogue space * Small changes to the exposure page Co-authored-by: Lewis Jordan <[email protected]> * Fix depth offset and transparent motion vector for unlit transparent (#896) * Fix depth offset and transparent motion vector for unlit transparent * cleanup and fix the shadow pre/post alpha clip * Fixed an exception occuring when a camera doesn't have an HDAdditionalCameraData (1254383). (#846) Co-authored-by: sebastienlagarde <[email protected]> * Fix Generates Include command issue with Physically Based Sky (#908) * Split GenerateHLSL code from PhysicallyBasedSkyRenderer in a separate file to fix Generator Includes tool * Update ShaderVariablesPhysicallyBasedSky.cs.hlsl * Fix ray tracing with XR single-pass (#891) * removed warnings related to ray binning in XR * fix RenderRayTracedReflections with XR * add errors if Path Tracing is used with XR single-pass * add missing shader macros * add entry to changelog Co-authored-by: sebastienlagarde <[email protected]> * Hdrp/clean shader stacks fields (#906) * Cleanup the HD fields * Fix distortion appearing two times in the UI * Pbr sky fixes metal (#911) * Split GenerateHLSL code from PhysicallyBasedSkyRenderer in a separate file to fix Generator Includes tool * Update ShaderVariablesPhysicallyBasedSky.cs.hlsl * Fix constant buffer layout for physically based sky - Update Vector3 to Vector4 to reflect actual padding/layout for non-DX platforms (both are 16 bytes in the shader space, but 12 bytes in C#) - Updates to shader code to reference only the float3 data being set up * Update references screenshots Co-authored-by: Sebastien Lagarde <[email protected]> * Cleaun shader config for shadow (#917) * Move HDShadowFilteringQuality to main package as it is not used anymore * Update Upgrading-from-2020.1-to-2020.2.md * Add comment for _IncludeIndirectLighting for emissive mesh and clean ShaderPas template code * Fix shader warning * Fix shader config in DXR projects * Fix warnings (#920) * Enable render graph test (#873) * re revert the PR * Fixed planar probes with render graph. * Fixed an issue with msaa resolve pass when movecs aren't enabled. Co-authored-by: Julien Ignace <[email protected]> * Add light layer on indirect lighting controller (#777) * Add support for reflection controller. * Fix compilation * Fixed compilation issue and naming * Fixed compilation issue and naming * Update IndirectLightingControllerEditor.cs * Update CHANGELOG.md * Update Override-Indirect-Lighting-Controller.md * Update Override-Indirect-Lighting-Controller.md * Update Override-Indirect-Lighting-Controller.md * Update. Indirect controller also affect planar Co-authored-by: Sebastien Lagarde <[email protected]> * Update IndirectLightingController.cs * Compute shader stripping (#919) * Compute shader stripping * changelog Co-authored-by: sebastienlagarde <[email protected]> * Enable DXR automated tests for XR (#915) * disable unsupported dxr tests in xr * enable dxr tests in xr on Yamato * add HDRP_DXR playmode_XR to ABV * Change guards around ESRAM code (#922) * Change unity version guards for ESRAM * move commas * Bump min version (#923) * Add a comment about packing float3/float4 * Added Opaque Cull Mode option for materials and ShaderGraph (#918) * Added the CullMode property for opaque objects * Updated changelog * Updated Opaque 8101 test * Fix SG preview and settings indent level * Add culmode opaque unlit Co-authored-by: sebastienlagarde <[email protected]> * Add test scene for SG vertex normal & tangent (#905) * Add test scene for vertex normal and vertex tangent * Add references images for other API * Updated the 2020.1 upgrade guide for custom pass volumes (#924) * HDRP Upgrade documentation for terrain new upgrade path (#901) * Upgrading documentation update * Typo * Added link to Terrain class * Fix warning in HDAdditionalLightData OnValidate (#885) * fix warning in HDAdditionalLightData OnValidate * Changelog * Avoid calling update Co-authored-by: sebastienlagarde <[email protected]> * [10.x.x@ Update screenshots of test 8101 Opaque for HDRP test for Linux and Win Vulkank * Add the list of HDRP forbidden keywords in SG blackboard (#926) * Add the list of forbidden keywords to use in SG blackboard in the doc * Update Customizing-HDRP-materials-with-Shader-Graph.md * Update Customizing-HDRP-materials-with-Shader-Graph.md * Add [MainColor] and [MainTexture] on property (#939) * Scene exposure override (#889) * Scene Exposure Override * Changelog * better changelog * fix Co-authored-by: sebastienlagarde <[email protected]> * Exposure curve remapping can specify curves for min/max limits (#882) * Port code * changelog * Revert HDRP asset Co-authored-by: sebastienlagarde <[email protected]> * IES Code path refactoring to support multiple SRP (#929) * Refactor * Refacto to support multiple SRPs * Missing doc + Re-enable PreviewGUI in the Inspector * Add Icons for IES Profiles * Rename Compositor to Graphics Compositor (#950) * Rename (HDRP) Compositor to Graphics Compositor * Missed a few occurancies * Ray traced reflection presets and fixes (#912) * - Fixed a bug related to denoising ray traced reflections. - Added presets for ray traced reflections. * Testing the asset of the ray tracing usage parameters in ssr * Mistake in history rejection for RTR * Only use one texture for ray traced reflection upscaling Adjust the upscale radius based on the roughness value * Adjusted the preset values * Updating the screenshots after changing the upscale radius metric. Co-authored-by: sebastienlagarde <[email protected]> * Fixed a warning in the ray tracing ambient occlusion compute shader. (#953) * - Fixed a warning in the ray tracing ambient occlusion compute shader. * Update CHANGELOG.md Co-authored-by: sebastienlagarde <[email protected]> * - Changed the way the filter size is decided for directional, point and spot shadows (#951) Co-authored-by: sebastienlagarde <[email protected]> * Various code cleanup in HDRP indirect diffuse lighting + Start remove macro RAYTRACING (#937) * Change code to have a indirectDiffuseMode and start to clean RaytracingMacro * Little extra cleanup * Final Image Histogram Debug View (#887) * Final image histogram ported * changelog Co-authored-by: sebastienlagarde <[email protected]> * Cleanup area shadow code and Macro + remove more Raytracing macro (#945) * Change code to have a indirectDiffuseMode and start to clean RaytracingMacro * Little extra cleanup * Clean area shadow code and remove usless macro * update shader config files for projects * Better naming for SKIP_RASTERIZED_AREA_SHADOWS * Update Upgrading-from-2020.1-to-2020.2.md * remove useless comment * HDRP: Fix shader warning in RaytracingAmbientOcclusion.compute * HDRP: Fix standalone build (Break in Exposure scene settings PR) * HDRP: Update HDRenderPipeineResources.asset not up to date * Cleanup HAVE_RECURSIVE_RENDERING usage (#958) * Change code to have a indirectDiffuseMode and start to clean RaytracingMacro * Little extra cleanup * Clean area shadow code and remove usless macro * update shader config files for projects * Better naming for SKIP_RASTERIZED_AREA_SHADOWS * Update Upgrading-from-2020.1-to-2020.2.md * remove useless comment * cleanup have deferred rendering * Move Screen Space Shadow to multicompile and remove config requirement for DXR (#960) * Change code to have a indirectDiffuseMode and start to clean RaytracingMacro * Little extra cleanup * Clean area shadow code and remove usless macro * update shader config files for projects * Better naming for SKIP_RASTERIZED_AREA_SHADOWS * Update Upgrading-from-2020.1-to-2020.2.md * remove useless comment * cleanup have deferred rendering * Clean RaytracingIndirectDiffuse.compute code * Move screen space shadow to a multicompile + remove Raytracing macro * Remove config package from DXR Test Co-authored-by: JulienIgnace-Unity <[email protected]> Co-authored-by: FrancescoC-unity <[email protected]> Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: anisunity <[email protected]> Co-authored-by: Fabien Houlmann <[email protected]> Co-authored-by: Antoine Lelievre <[email protected]> Co-authored-by: Jesse Barker <[email protected]> Co-authored-by: Evgenii Golubev <[email protected]> Co-authored-by: remi-chapelain <[email protected]> Co-authored-by: Pavlos Mavridis <[email protected]> Co-authored-by: skhiat <[email protected]>
https://fogbugz.unity3d.com/f/cases/1254383/
The exact problem was the following. If you created a camera without an HDRP asset assigned and kept the inspector on the camera while assigning the asset, the inspector was still the builtin one and the reset function was the triggering point of when the new inspector was used. The fix seems to resolve the problem properly.