i’m trying to implement volumetric rendering with babylonjs.
I’m following this tutorial http://www.lebarba.com and i’m using this github project as a template (done with threejs and shader):
The main part is solved with shader code. I tried to port the shader code (providing
samples and changing the provided uniforms to match babylonjs names).
The shader does compile for now, and the first pass shader (simple) looks correct.
I’m new to multi pass rendering and shaders, so please bear with me
I’ve got at least one problem with the multi pass rendering, at least that is what i’m thinking.
Playground with my progress so far: https://playground.babylonjs.com/#Z8BXU0#12
What am i missing, is the definition of of the render list correct and is the correct box pushed into it?
I’m pushing the same mesh that holds the RenderTarget Texture…
scene.customRenderTargets.push(renderTargetTexture); ... pass2Shader.setTexture("tex", renderTargetTexture); renderTargetTexture.renderList.push(boxPass2);
Is there already another approach? I couldn’t find anything on it with babylonjs