Skip to content

Commit

Permalink
Use Dynamic GI mode for moving objects in LightmapGI probe influence …
Browse files Browse the repository at this point in the history
…benchmark

This is required for lightmap probes to affect it.

LightmapProbe nodes that were created at runtime were also removed,
as the baked lightmap already contains generated probes and placing
probes at runtime has no effect if lightmaps aren't baked to include
those new probes.
  • Loading branch information
Calinou committed Jun 19, 2024
1 parent 3c08e80 commit 74ed0f7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions benchmarks/rendering/lightmap_probe_influence.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ class TestScene:
var lightmap := LightmapGI.new()
lightmap.light_data = load("res://supplemental/sponza.lmbake")
$Sponza.add_child(lightmap)
var half_probes := NUMBER_OF_PROBES / 2
for i in NUMBER_OF_PROBES:
var probe := LightmapProbe.new()
probe.position.y = 1
probe.position.z = i - half_probes
$Sponza.add_child(probe)

var meshes: Array[PrimitiveMesh] = [
BoxMesh.new(),
Expand All @@ -43,6 +37,7 @@ class TestScene:
var half_objects := NUMBER_OF_OBJECTS / 2
for i in NUMBER_OF_OBJECTS:
var ins := MeshInstance3D.new()
ins.gi_mode = GeometryInstance3D.GI_MODE_DYNAMIC
ins.mesh = meshes[i % meshes.size()]
ins.position.y = 1
ins.position.z = i - half_objects
Expand Down

0 comments on commit 74ed0f7

Please sign in to comment.