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

lovr.headset.setBackground; #824

Merged
merged 1 commit into from
Jan 1, 2025
Merged

lovr.headset.setBackground; #824

merged 1 commit into from
Jan 1, 2025

Conversation

bjornbytes
Copy link
Owner

This refactors the new background layer types (cube/sphere) into a lovr.headset.setBackground function that can take an equirect or cubemap texture/images. Now there is just 1 layer type (quads) and LayerType is removed.

@bjornbytes
Copy link
Owner Author

  • stereo backgrounds aren't supported yet, but could be.
  • formats are annoying. you can't do lovr.headset.setBackground('sky.hdr') because that will load an rgba32f image, but right now layers must be rgba8. Runtimes do support other texture formats for layers, but rgba32f isn't supported everywhere. However, you CAN do lovr.headset.setBackground(lovr.graphics.newTexture('sky.hdr')) because this will do a texture blit, which supports format conversion. Hopefully we can smooth this out in the future.

@bjornbytes bjornbytes merged commit 9c3310b into dev Jan 1, 2025
10 checks passed
@bjornbytes bjornbytes deleted the background-layer branch January 1, 2025 03:15
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.

1 participant