Skip to content

Commit

Permalink
Make the number of probes in lightmap probe influence benchmark easil…
Browse files Browse the repository at this point in the history
…y configurable
  • Loading branch information
OverloadedOrama committed Jun 17, 2024
1 parent a5b1e25 commit 54ddac3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions benchmarks/rendering/lightmap_probe_influence.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Benchmark

const NUMBER_OF_OBJECTS := 1000
const NUMBER_OF_PROBES := 500


func _init() -> void:
Expand All @@ -25,13 +26,12 @@ class TestScene:
var lightmap := LightmapGI.new()
lightmap.light_data = load("res://supplemental/sponza.lmbake")
$Sponza.add_child(lightmap)
# Create 512 probes
for x in 8:
for y in 8:
for z in range(-2, 6):
var probe := LightmapProbe.new()
probe.position = Vector3(x, y, z)
$Sponza.add_child(probe)
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 Down

0 comments on commit 54ddac3

Please sign in to comment.