Lighting VR

Hi, Lighting (1x Directional Realtime) works in Browser and AR but not in VR, am i missing something?

Original Post on Discord

by user 486138778348683274

Hey, can you check that you dont have a XRFlag component in the parent hierarchy of the light that disables it in VR ?

There is no XRFlag

by user 486138778348683274

The Log:

[vite] connecting… client.ts:19:8
[vite] connected. client.ts:134:14
WARNING: Multiple instances of Three.js being imported. three.cjs:35631:10
Made with :heart: by :cactus: needle - https://needle.tools — Version 2.39.3-pre gen.js:26:9
Needle Engine: Begin loading engine_element.ts:169:24
Needle Engine: finished loading engine_element.ts:212:24
THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType. three.module.js:24155:14
WebGL warning: texSubImage: Alpha-premult and y-flip are deprecated for non-DOM-Element uploads.
WebGL warning: readPixels: pixels type does not match type. 6
registered interaction, can play audio now AudioSource.ts:68:20
The optional feature ‘bounded-floor’ is not supported 192.168.1.101:3000:938:33
The optional feature ‘hand-tracking’ is not supported 192.168.1.101:3000:938:33
The optional feature ‘high-fixed-foveation-level’ is not supported 192.168.1.101:3000:938:33
The optional feature ‘layers’ is not supported 192.168.1.101:3000:938:33
[XR] session begin

by user 486138778348683274

Mmh which VR headset do you use?

Quest 1 but it is the same problem im chrome and firefox

by user 486138778348683274

Ok same with the samples

by user 486138778348683274

is also unlit

by user 486138778348683274

maybe Collaborative Sandbox helps (debuglights) ? Try removing the light in the center maybe?

The screen above is live from your site, would you mind checking if you get lighting in VR there?

by user 486138778348683274

Youre right - no shadows there. But i just tried with a sample scene and that works

but that scene appears pretty dim when in VR (even with that local version)

need to investigate that further later - first screenshot is from the Sandbox scene that is not looking right in VR - second screenshot is default from the Cannon Playground sample scene that looks as expected in VR


Thanks for looking into it, though the environmental lighting appears to be correct but the real time lights are gone in VR.

by user 486138778348683274

I had some shadows but with very little contrast and overall it looked to dark (like if the environment lighting was gone in VR - not sure tho). Thanks for bringing it up

Thanks too. I go and check how light intensity is handled

by user 486138778348683274

Just to check back, the light intensity seems to be off roughly by a factor of 10 for VR. So if you crank your lights x10 up it looks correct in VR. Sounds like easy to fix. :wink:

by user 486138778348683274

@marcel :cactus: can you estimate when the error will be fixed?

by user 486138778348683274

Oh sorry thanks for the ping - I’ve forgotten about this issue. Would you mind opening it as a issue on github? I’ll try to look at it later today

Okay

by user 486138778348683274