-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Lots of new Layer features; #816
Conversation
- Add Layer:get/setCurve for curved layers. Curved. Layers. - Add new `sphere` and `cube` layer types (existing layers are `quad` layers now). `cube` layers are cubemap textures, and `sphere` layers are equirectangular images. These are mainly intended to be used for backgrounds that have higher sampling quality, more stable tracking, and don't need to be re-rendered every frame. Currently sphere/cube layers always render underneath the main layer. - Remove Layer:get/setViewMask. Instead, there's a `stereo` flag in newLayer, which will create an array texture and put each layer in the corresponding eye, just like how the main layer works. This works for all layer types, so you can have stereo cubemaps and stuff. - `lovr.headset.setLayers` takes a `main` key that can be used to disable the main layer, which can be useful for overlay apps that don't need to render any 3D content. - There is a new `static` flag in newLayer which can be used for static content. The layer can only be changed once, but it uses a lot less VRAM. - There is a new `transparent` flag in newLayer. Disabling transparency may improve performance slightly. - New HeadsetFeatures: `layerCube`, `layerSphere`, `layerCurve`. - Default errhand disables layers now.
1a5b62e
to
e28a820
Compare
|
|
Why differentiate between cube and sphere layer type in API, is there anything user-facing that makes it worth to expose it? I imagine I would expect to pass in the equirect or cubemap texture and the layer would internally figure it out. Would it be possible to fetch the underlying Layer texture after the init? Not really that important but nice to have. |
Regarding the texture: Yes, you can call |
I'm actually trying out a simpler API on the background-layers branch where there is just a |
Layer:setCurve
for curved layers. Curved. Layers.sphere
andcube
layer types (existing layers arequad
layers now).cube
layers are cubemap textures, andsphere
layers are equirectangular images. These are mainly intended to be used for backgrounds that have higher sampling quality, more stable tracking, and don't need to be re-rendered every frame. Currently sphere/cube layers always render underneath the main layer.Layer:get/setViewMask
. Instead, there's astereo
flag in newLayer, which will create an array texture and put each layer in the corresponding eye, just like how the main layer works. This works for all layer types, so you can have stereo cubemaps and stuff.lovr.headset.setLayers
takes amain
key that can be used to disable the main layer, which can be useful for overlay apps that don't need to render any 3D content.static
flag in newLayer which can be used for static content. The layer can only be changed once, but it uses a lot less VRAM.transparent
flag in newLayer. Disabling transparency may improve performance slightly.Layer:get/setColor
, so you can change a layer's color or fade it in/out without rerendering it.layerCube
,layerSphere
,layerCurve
.