Skip to content

Vulkan: VoxelGI does not take custom shaders into account for emission if the mesh's GI mode is Static #64124

@Calinou

Description

@Calinou

Godot version

4.0.alpha13

System information

Fedora 36, GeForce GTX 1080 (NVIDIA 515.57)

Issue description

VoxelGI does not take custom shaders into account for emission if the mesh's GI mode is Static.
This may be a limitation, in which case this should be documented.

2022-08-08_21 44 41

For reference, it works with LightmapGI (dynamic objects are not included in the bake as expected):

image

Steps to reproduce

  • Add MeshInstance3D to act as a floor, with Static global illumination mode.
  • Add a second MeshInstance3D with an emissive BaseMaterial3D (StandardMaterial3D). Keep its GI mode to the default Static.
  • Add a third MeshInstance3D (with static GI mode). Assign it a ShaderMaterial whose contents are:
shader_type spatial;

void fragment() {
	EMISSION = vec3(0.0, 1.0, 0.6);
}
  • Add a VoxelGI node covering all 3 meshes, then click Bake at the top of the 3D editor viewport.

Minimal reproduction project

test_voxelgi_custom_shader_emission.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions