See in this playground (https://www.babylonjs-playground.com/#1SLLOJ#616), if I set a contrast different from 1, the waterMaterial become visible behind the fog.
This is because the water material does not write content in linear mode. Only standard and PBR material can do it.
Pinging @julien-moreau to see if he wants to add it to his material
The relevant code is here:
Do you think what @Deltakosh suggest is doable?
Hey @PichouPichou !
Sure it is doable, will update ASAP
I’m finalizing a request feature on the editor to release ASAP. Then, will update the water material
Will let you know once done!
Still in my TODO, will find some time really soon!!
Haha, thanks to keep us in touch @julien-moreau !
Hi @julien-moreau, I don’t want to bother but just a message to know if this done so that I can test it?
// Composition vec4 color = vec4(finalDiffuse + finalSpecular, alpha); #include<logDepthFragment> #include<fogFragment> #ifdef IMAGEPROCESSINGPOSTPROCESS color.rgb = toLinearSpace(color.rgb); #else #ifdef IMAGEPROCESSING color.rgb = toLinearSpace(color.rgb); color = applyImageProcessing(color); #endif #endif gl_FragColor = color; }
On the water fragment right?
I think I need to make the constructor flag if there is image processing or not now though on the scene and make it push that define.
I guess @Deltakosh is the one who can answer your question.
But it maches with the example he sent already so that must be it
@Pryme8 Yes but you could take a look how it is embedded in standardMaterial for instance as you also require the includes and all the different bindings/uniforms and so on.
kk, Ill take a look at getting us a PR to fix this then. I know julien is busy.
I am not at the house so I did this on the inline browser. Not sure if it has everything but I think it might.
@PichouPichou finally added the feature. I’m creating the PR soon
Awesome, thank you very very much @julien-moreau!
Thank you @julien-moreau I forgot I had an unfinished PR for this. I appreciate you remembering that we needed to fix this and doing the PR.