mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-06 19:39:56 -05:00
Fix issue that causes atmosphere to show up on the other side of a planet if the shading is disabled (closes #677)
This commit is contained in:
@@ -248,7 +248,13 @@ Fragment getFragment() {
|
||||
// because all calculation for light interactions are done in Object
|
||||
// Space, we avoid a new computation saving the normals in Object Space.
|
||||
frag.gNormal.xyz = normalModelSpace;
|
||||
frag.gPosition = vec4(positionCameraSpace, 1.0); // in Camera Rig Space
|
||||
|
||||
if (dot(positionCameraSpace, vec3(1.0)) != 0.0) {
|
||||
frag.gPosition = vec4(positionCameraSpace, 1.0); // in Camera Rig Space
|
||||
}
|
||||
else {
|
||||
frag.gPosition = vec4(1.0); // in Camera Rig Space
|
||||
}
|
||||
|
||||
frag.depth = fs_position.w;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user