Dante83 / A-Starry-Sky

A Realistic Skybox for A Frame! :D
MIT License
65 stars 7 forks source link

Gah! >_< Draw Order Is Acting Crazy in VR #3

Closed Dante83 closed 5 years ago

Dante83 commented 5 years ago

In VR mode, something is messing with the draw distance so that GPU doesn't know whether to draw the sun, the moon or the sky. These are a massive distance apart, so I obviously need to be a bit more... direct with THREE.JS. That's what I get for toying with this for months before throwing on a VR headset to explore the results.

Dante83 commented 5 years ago

UPDATE: Thought I got the Z-Index working but I wanted to verify it today on VR and ran into a new bug. My moon is now showing through the ground. This is less then optimal. Sorry for the inconvenience @_@.

Dante83 commented 5 years ago

Ok, I think the latest update to master fixed this. Turns that subtracting 2.0 from gl_position in the vertex shader was a bit much. I needed to just offset each by a little bit instead so they didn't accidentally jump in front of other elements.