In the DefaultRenderingPipeline constructor we have an optionnal hdr property, which is true by default. I often turn it to false, to get my raw RGB value for my background, example:
As you can see, nothing change on my 3D materials (playground available: hdr on, hdr off, line 28, results are the same when in standard materials [on - off]).
And for now, all we have in the documentation about this property is Do you want HDR textures? and If high dynamic range textures should be used (default: true) from the API, and I think this should be clarified (I will make the PR ;)) : on which kind of textures/properties this HDR value is applied exactly?
My guesses:
backgroundMaterials
scene environmentTexture when in PBR? (but it seems not, because why my materials rendering doesn’t change?)
After looking at the sources, what does hdr = true:
First note that hdr is set back to false if your GPU does not support one of the half float or float texture type (meaning hdr remains true only if the GPU supports at least half float or float textures)
[EDIT] Forgot to say that if hdr remains true, texture types used by the post process effects are half float textures if supported, else float textures
The image processing post process is done after bloom and before sharpen and is not applied on a per mesh basis as it is by default
Nice spots, it’s already useful information to add to the doc.
So in short, this hdr value only apply on the post-process texture used by the pipeline that’s it?
('will also wait for Deltakosh, sebavan or trevor feedbacks, who are the code contributors)
I just had another issue (imageProcessing not applied on background layer, and so the vignette [hdr on - hdr off]), and these points have also to be saved into the doc’ IMO:
OK so after some tries I haven’t find a way to use a BABYLON.Layer as background without having it “gammaized” (or linearized?) :’( (cf https://www.babylonjs-playground.com/#ECI2Q0#16).
And it seems that doing the trick by settings scene.clearColor transparent, and simply using CSS to set a background works well… but not on iOS (scene clear… isn’t cleared on our devices)
For me it’s the other way around, when HDR is enabled image processing is performed in a post process in another render pass, whereas if it is disabled it is performed during rendering of meshes
Ahah ok.
It’s just that for the documentation, I’m now used to grunt build & serve, so I’m able to know if I broked something, but I never tried to check if my Babylon fork is broke after a change (all I have done in /src/ is just for API comments for now, so that’s safe).