Skip to content

Use empty buffer instead of populating junk data#27

Merged
jgayfer merged 3 commits intomainfrom
empty-buffers
Aug 26, 2024
Merged

Use empty buffer instead of populating junk data#27
jgayfer merged 3 commits intomainfrom
empty-buffers

Conversation

@jgayfer
Copy link
Copy Markdown
Owner

@jgayfer jgayfer commented Aug 22, 2024

Summary

When our GpuArrayBuffer has no data in it, we don't have a binding to use to send to the GPU, in which case the node generally won't run. We can use this "empty" buffer to supply our shaders with a "junk" binding, allowing the shaders to still run.

With a fallback "empty" binding, we no longer have to send junk point light and occluder data to the GPU (which I believe fixes #23).

When our GpuArrayBuffer has no data in it, we don't have a binding to use
to send to the GPU, in which case the node generally won't run.

We can use this "empty" buffer to supply our shaders with a "junk" binding,
allowing the shaders to still run (assuming we don't read from this).
With a fallback "empty" binding, we no longer have to send junk point
light and occluder data to the GPU (which I believe has been causing
some issues).
@jgayfer jgayfer merged commit e0a2b2d into main Aug 26, 2024
@rparrett rparrett mentioned this pull request Oct 22, 2024
@jgayfer jgayfer deleted the empty-buffers branch October 29, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blind spot at bottom of pointlights

1 participant