Add Cone and Cylinder shapes to FogVolume

This complements the existing Ellipsoid and Box local fog shapes.

This can be used to represent a light cone coming from a SpotLight.
This commit is contained in:
Hugo Locurcio
2022-05-21 12:17:49 +02:00
parent 1c99b7415f
commit e85459dcd1
8 changed files with 49 additions and 12 deletions

View File

@ -97,6 +97,8 @@ AABB RendererStorageRD::fog_volume_get_aabb(RID p_fog_volume) const {
switch (fog_volume->shape) {
case RS::FOG_VOLUME_SHAPE_ELLIPSOID:
case RS::FOG_VOLUME_SHAPE_CONE:
case RS::FOG_VOLUME_SHAPE_CYLINDER:
case RS::FOG_VOLUME_SHAPE_BOX: {
AABB aabb;
aabb.position = -fog_volume->extents;