mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 13:08:49 -05:00
Added support to G-Buffer. (#532)
This commit is contained in:
committed by
Alexander Bock
parent
f0a55b21ff
commit
95e0cf478d
@@ -28,6 +28,7 @@ in vec2 vs_st;
|
||||
in vec3 vs_normalViewSpace;
|
||||
in vec4 vs_positionCameraSpace;
|
||||
in float vs_screenSpaceDepth;
|
||||
in vec3 vs_normalObjSpace;
|
||||
|
||||
uniform bool performShading = true;
|
||||
uniform vec3 directionToSunViewSpace;
|
||||
@@ -68,8 +69,11 @@ Fragment getFragment() {
|
||||
frag.color.rgb = diffuseAlbedo;
|
||||
}
|
||||
|
||||
frag.color.a = 1.0;
|
||||
frag.depth = vs_screenSpaceDepth;
|
||||
frag.color.a = 1.0;
|
||||
frag.depth = vs_screenSpaceDepth;
|
||||
frag.gPosition = vs_positionCameraSpace;
|
||||
frag.gNormal = vec4(vs_normalObjSpace, 1.0);
|
||||
|
||||
|
||||
return frag;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ out vec2 vs_st;
|
||||
out vec3 vs_normalViewSpace;
|
||||
out float vs_screenSpaceDepth;
|
||||
out vec4 vs_positionCameraSpace;
|
||||
out vec3 vs_normalObjSpace;
|
||||
|
||||
uniform mat4 modelViewTransform;
|
||||
uniform mat4 projectionTransform;
|
||||
|
||||
Reference in New Issue
Block a user