mirror of https://github.com/bjornbytes/lovr.git
Make clipping planes consistent across most headset drivers;
The default far clipping plane was changed from 30 to 100 for openvr and oculus. oculus_mobile clipping planes can't be changed easily.
This commit is contained in:
parent
8c429e89ac
commit
c7f5406ce2
|
@ -29,7 +29,7 @@ static struct {
|
|||
|
||||
static bool desktop_init(float offset, uint32_t msaa) {
|
||||
state.offset = offset;
|
||||
state.clipNear = 0.1f;
|
||||
state.clipNear = .1f;
|
||||
state.clipFar = 100.f;
|
||||
|
||||
if (!state.initialized) {
|
||||
|
|
|
@ -87,8 +87,8 @@ static bool oculus_init(float offset, uint32_t msaa) {
|
|||
|
||||
state.needRefreshTracking = true;
|
||||
state.needRefreshButtons = true;
|
||||
state.clipNear = 0.1f;
|
||||
state.clipFar = 30.f;
|
||||
state.clipNear = .1f;
|
||||
state.clipFar = 100.f;
|
||||
|
||||
map_init(&state.textureLookup, 4);
|
||||
|
||||
|
|
|
@ -416,6 +416,9 @@ static bool openxr_init(float offset, uint32_t msaa) {
|
|||
state.layerViews[1].subImage.imageRect.offset.x += state.width;
|
||||
}
|
||||
|
||||
state.clipNear = .1f;
|
||||
state.clipNear = 100.f;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ var LibraryLOVR = {
|
|||
var a, b, c, d, e, canvas, display;
|
||||
webvr.initialized = true;
|
||||
webvr.display = display = Module.lovrDisplay;
|
||||
webvr.display.depthNear = .1;
|
||||
webvr.display.depthFar = 100;
|
||||
webvr.canvas = canvas = Module.canvas;
|
||||
webvr.frameData = new VRFrameData();
|
||||
webvr.gamepads = [];
|
||||
|
|
Loading…
Reference in New Issue