mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 19:29:04 -05:00
Important comments for development.
This commit is contained in:
@@ -514,11 +514,12 @@ void main() {
|
||||
//vec4 positionArray[8];
|
||||
float maxAlpha = -1.0;
|
||||
for (int i = 0; i < nAaSamples; i++) {
|
||||
meanNormal += texelFetch(mainNormalTexture, ivec2(gl_FragCoord), i);
|
||||
meanNormal += texelFetch(mainNormalTexture, ivec2(gl_FragCoord), i);
|
||||
vec4 color = texelFetch(mainColorTexture, ivec2(gl_FragCoord), i);
|
||||
if ( color.a > maxAlpha )
|
||||
maxAlpha = color.a;
|
||||
meanColor += color;
|
||||
// Data in the mainPositionTexture are written in view space (view plus camera rig)
|
||||
meanPosition += texelFetch(mainPositionTexture, ivec2(gl_FragCoord), i);
|
||||
meanOtherData += texelFetch(otherDataTexture, ivec2(gl_FragCoord), i);
|
||||
//positionArray[i] = texelFetch(mainPositionTexture, ivec2(gl_FragCoord), i);
|
||||
|
||||
@@ -110,7 +110,7 @@ void main() {
|
||||
// Add the height in the direction of the normal
|
||||
pair.position += pair.normal * height;
|
||||
vec4 positionClippingSpace =
|
||||
modelViewProjectionTransform * vec4(pair.position, 1);
|
||||
modelViewProjectionTransform * vec4(pair.position, 1.0);
|
||||
|
||||
// Write output
|
||||
fs_uv = in_uv;
|
||||
@@ -118,5 +118,5 @@ void main() {
|
||||
gl_Position = fs_position;
|
||||
ellipsoidNormalCameraSpace = mat3(modelViewTransform) * pair.normal;
|
||||
fs_normal = pair.normal;
|
||||
positionCameraSpace = vec3(modelViewTransform * vec4(pair.position, 1));
|
||||
positionCameraSpace = vec3(modelViewTransform * vec4(pair.position, 1.0));
|
||||
}
|
||||
|
||||
@@ -206,11 +206,15 @@ Fragment getTileFragment() {
|
||||
|
||||
// Other data
|
||||
#if USE_WATERMASK
|
||||
// Water reflectance is added to the G-Buffer.
|
||||
frag.gOtherData = vec4(waterReflectance, waterReflectance, waterReflectance, 1.0);
|
||||
#else
|
||||
frag.gOtherData = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
#endif
|
||||
// Normal is written in Camera Rig (OS Eye) Space
|
||||
// Normal is written Object Space.
|
||||
// Right now the only renderable using this info is the atm and,
|
||||
// because all calculation for light interactions are done in Object
|
||||
// Space, we avoid a new computation saving the normals in Object Space.
|
||||
frag.gNormal = vec4(normalModelSpace, 1.0);
|
||||
frag.gPosition = vec4(positionCameraSpace, 1.0); // in Camera Rig Space
|
||||
|
||||
|
||||
Reference in New Issue
Block a user