Fixing the skybox, still issues with the lights

This commit is contained in:
samcake 2016-10-28 18:12:39 -07:00
parent 9e91926426
commit 9adbb42a6c
3 changed files with 5 additions and 3 deletions

View file

@ -80,7 +80,7 @@ vec3 getEyeWorldPos() {
bool cam_isStereo() {
#ifdef GPU_TRANSFORM_IS_STEREO
return true;
return getTransformCamera()._stereoInfo.x > 0.0;
#else
return _camera._stereoInfo.x > 0.0;
#endif
@ -89,7 +89,7 @@ bool cam_isStereo() {
float cam_getStereoSide() {
#ifdef GPU_TRANSFORM_IS_STEREO
#ifdef GPU_TRANSFORM_STEREO_CAMERA
return float(_stereoSide);
return getTransformCamera()._stereoInfo.y;
#else
return _camera._stereoInfo.y;
#endif

View file

@ -36,4 +36,6 @@ void main(void) {
// Position is supposed to come in clip space
gl_Position = vec4(inPosition.xy, 0.0, 1.0);
<$transformStereoClipsSpace(cam, gl_Position)$>
}

View file

@ -24,7 +24,7 @@ out vec4 _texCoord0;
void main(void) {
if (sphereParam.w != 0.0) {
// standard transform
TransformCamera cam = getTransformCamera();
TransformObject obj = getTransformObject();