Forum Discussion
Viconthebeach
2 years agoProtege
Set HDR enabled/disabled at runtime?
Passthrough still won't works (black screen) if HDR is enabled in the render pipeline asset settings,
so I must build the project with HDR disabled.
How can I activate HDR when the passthrough stage is done to get post processing effects on ?
Actually I can successfully tick from script the HDR option, but it is not activating post processing effects at runtime.
// This ticks the checkbox while running on editor, but no effects at runtime on the headset.
var urpAsset = (UniversalRenderPipelineAsset)GraphicsSettings.renderPipelineAsset;
urpAsset.supportsHDR = true;
3 Replies
- ViconthebeachProtege
Got it, using different URP renderers and setting the desired renderer for the camera at runtime:
Camera.main.GetUniversalAdditionalCameraData().SetRenderer(1); // index 1 is HDR renderer Camera.main.GetUniversalAdditionalCameraData().renderPostProcessing = true; Camera.main.GetUniversalAdditionalCameraData().allowHDROutput = true; Camera.main.allowHDR = true;Don't forget to set the HDR enabled on the Pipeline Asset prior to build, passthrough will works if the camera uses a no HDR renderer and postprocessing is disabled.
- maoshmellowExplorer
Hi Vic,
Thanks for documenting your process. I've been running into a similar issue and was wondering if you could elaborate on how you can set a renderer to be "no HDR"? To my belief, you set HDR options for URP in project settings and not on the renderer itself.
- ViconthebeachProtege
Hi, Just go to the project panel, right click>create>Rendering>URP Asset (with URP renderer)
Then look to the inspector panel of the newly created renderer pipeline asset, in the quality settings there's a HDR checkbox. But in fact now the issue isn't occuring anymore, you can just use a Render Pipeline Asset with HDR on, then set the camera with or without HDR output and post-processing effects. It works like a charm now.ā
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 10 months ago
- 3 years ago
- 3 months ago