Hey everyone. Been working on a physically based skybox shader for HDRP. I’m currently trying to get the sky to blend with the geometry to create a fog effect.
Thing is, when I set the shader pass up to alpha blend, it doesn’t blend with the geometry. Instead, it blends with the last skybox frame.
Naturally this makes me think that the color buffer I get passed doesn’t have that info, but when I set Ztest to LEqual it renders the geometry fine. I thought maybe there was a compositing step here but I check it out in renderdoc and no such step exists. It’s like when I set Ztest to LEqual the color buffer has the rendered geo in it, and when I set it to Always it doesn’t.
Super weird, not really expecting an answer, but hoping someone has encountered this.
Interesting to see what results you can achieve with this aproach. Do you render skybox after all geometry (opaque and transparent)? Do you use custom pass for that? Is it different of what fog from HDRP doing? I am kinda new to shader stuff so sorry if it is dumb questions.
Hey sorry I’m replying literally two months later.
My current strategy is basically what you describe—render the skybox after all the geometry has been rendered (as part of an HDRP custom sky implementation). I wouldn’t say that I use a fully custom shader pass, since it slots into the pipeline at the predefined “sky” spot.
It’s pretty similar to what HDRP fog does in “volumetric” mode, as far as I know.