Eevee: Volumetrics: Add Volume object support.
authorClément Foucault <foucault.clem@gmail.com>
Fri, 27 Oct 2017 14:20:33 +0000 (16:20 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Fri, 27 Oct 2017 20:49:15 +0000 (22:49 +0200)
commit4f7665c84410e9e25360b0d80ce073c54242e5d4
tree58b248d3fd41d1312e6f7bfd455cb583f251137b
parent18ba7e26ad445981fb2750ec4bef1273f11d1554
Eevee: Volumetrics: Add Volume object support.

This is quite basic as it only support boundbing boxes.
But the material can refine the volume shape in anyway the user like.

To overcome this limitation, a voxelisation should be done on the mesh (generating a SDF maybe?) and tested against every volumetric cell.
source/blender/draw/engines/eevee/eevee_effects.c
source/blender/draw/engines/eevee/eevee_materials.c
source/blender/draw/engines/eevee/eevee_private.h
source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl
source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/nodes/shader/nodes/node_shader_tex_coord.c