Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use empty buffer instead of populating junk data #27

Merged
merged 3 commits into from
Aug 26, 2024
Merged

Conversation

jgayfer
Copy link
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
6 checks passed
@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