Added missing changes from SunEarth day for the stereo branch.

This commit is contained in:
Jonathas Costa
2018-04-20 11:35:13 -04:00
parent 5079beba78
commit cec7d45fed
3 changed files with 18 additions and 1 deletions

View File

@@ -45,5 +45,12 @@ Fragment getFragment() {
}
frag.depth = pscDepth(gs_position);
// G-Buffer
frag.gPosition = vec4(0.0);//vs_gPosition;
// There is no normal here
// TODO: Add the correct normal if necessary (JCC)
frag.gNormal = vec4(0.0, 0.0, -1.0, 1.0);
return frag;
}

View File

@@ -40,6 +40,14 @@ Fragment getFragment() {
frag.depth = vs_depth;
frag.color = fragColor;
// G-Buffer
frag.gPosition = vec4(0.0);//vs_gPosition;
// There is no normal here
// TODO: Add the correct normal if necessary (JCC)
frag.gNormal = vec4(0.0, 0.0, -1.0, 1.0);
if (usingAdditiveBlending) {
frag.blend = BLEND_MODE_ADDITIVE;
}

View File

@@ -63,7 +63,7 @@ const int colorByQuantity = 1;
out vec4 vs_color;
out float vs_depth;
//out vec4 vs_gPosition;
vec4 getTransferFunctionColor() {
// Remap the color scalar to a [0,1] range
@@ -121,6 +121,8 @@ void main() {
vec4 position_in_meters = vec4(in_position, 1);
vec4 positionClipSpace = modelViewProjection * position_in_meters;
//vs_gPosition = vec4(modelViewTransform * dvec4(in_point_position, 1));
gl_Position = vec4(positionClipSpace.xy, 0, positionClipSpace.w);
vs_depth = gl_Position.w;
}