Hi, all! I am trying to implement VolumetricLightmaps into Babylon.
Currently, I have finished export data we need from UE4, which is called FPrecomputedVolumetricLightmapData. It contains volumetric lightmap bricks’ position and size, also light information (Ambient, spherical harmonic coefficients, shadow factor and Bent Normal, they are all 3D Texture).
I have two questions:
- Does WebGL support 3D Texture Array? This is good for bind spherical harmonic coefficients to uniform buffer.
- Where do I add and manage these codes? Maybe I can regard it as part of scene (kind of like environment map, scene.VolumetricLightmaps). For management, my thought is to create a file VolumetricLightmap.ts and put them into folder Materials/ rather than Materials/Textures. Since volumetric lightmaps is a combination of several textures rather than a single texture.