Merged master. It broke the bloom filter.

This commit is contained in:
Jonathas Costa
2019-06-19 20:47:37 -04:00
1393 changed files with 16974 additions and 11009 deletions
+32 -32
View File
@@ -37,40 +37,40 @@ set(SOURCE_FILES
source_group("Source Files" FILES ${SOURCE_FILES})
set(SHADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_common.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_common.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_fs.glsl
)
source_group("Shader Files" FILES ${SHADER_FILES})
create_new_module(
"Atmosphere"
atmosphere_module
STATIC
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
"Atmosphere"
atmosphere_module
STATIC
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -276,30 +276,11 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
glm::dmat4 dInverseProjection = glm::inverse(
glm::dmat4(renderData.camera.projectionMatrix()));
// SGCT Projection to OS Camera Before Rotation
glm::dmat4 dProjectionToTmpRotTransformMatrix =
glm::mat4_cast(
static_cast<glm::dquat>(renderData.camera.rotationQuaternion())
) *
dSgctEye2OSEye *
glm::inverse(renderData.camera.viewScaleMatrix()) *
glm::dmat4 inverseWholeMatrixPipeline =
inverseModelMatrix *
dSGCTViewToWorldMatrix *
dInverseProjection;
// SGCT Projection to World Space
glm::dmat4 dSgctProjectionToWorldTransformMatrix(
dProjectionToTmpRotTransformMatrix
);
double* mSource = glm::value_ptr(dSgctProjectionToWorldTransformMatrix);
mSource[12] += renderData.camera.eyePositionVec3().x;
mSource[13] += renderData.camera.eyePositionVec3().y;
mSource[14] += renderData.camera.eyePositionVec3().z;
mSource[15] = 1.0;
// SGCT Projection to Object Space
glm::dmat4 inverseWholeMatrixPipeline = inverseModelMatrix *
dSgctProjectionToWorldTransformMatrix;
program.setUniform(_uniformCache2.dSgctProjectionToModelTransformMatrix,
inverseWholeMatrixPipeline);
@@ -364,7 +345,8 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
// First we determine if the caster is shadowing the current planet
// (all calculations in World Coordinates):
glm::dvec3 planetCasterVec = casterPos - renderData.position.dvec3();
glm::dvec3 planetCasterVec =
casterPos - renderData.modelTransform.translation;
glm::dvec3 sourceCasterVec = casterPos - sourcePos;
double sc_length = glm::length(sourceCasterVec);
glm::dvec3 planetCaster_proj = (
@@ -378,7 +360,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
double casterDistSun = glm::length(casterPos - sunPosWorld);
double planetDistSun = glm::length(
renderData.position.dvec3() - sunPosWorld
renderData.modelTransform.translation - sunPosWorld
);
ShadowRenderingStruct shadowData;
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -90,6 +90,8 @@ uniform dmat4 dSgctProjectionToModelTransformMatrix;
uniform dvec4 dCamPosObj;
uniform dvec3 sunDirectionObj;
uniform float blackoutFactor;
/*******************************************************************************
***** ALL CALCULATIONS FOR ECLIPSE ARE IN METERS AND IN WORLD SPACE SYSTEM ****
*******************************************************************************/
@@ -246,11 +248,13 @@ void dCalculateRayRenderableGlobe(in int mssaSample, out dRay ray,
// Compute positions and directions in object space.
dvec2 samplePos = dvec2(msaaSamplePatter[mssaSample],
msaaSamplePatter[mssaSample+1]);
//dvec4 clipCoords = dvec4(interpolatedNDCPos.xy + samplePos, 0.0, 1.0);
dvec4 clipCoords = dvec4(interpolatedNDCPos.xy, 0.0, 1.0);
dvec4 clipCoords = dvec4(interpolatedNDCPos.xy, 1.0, 1.0);
// Clip to Object Coords
dvec4 objectCoords = dSgctProjectionToModelTransformMatrix * clipCoords;
objectCoords /= objectCoords.w;
// Planet Position in Object Space
// JCC: Applying the inverse of the model transformation on the object postion in World
@@ -563,7 +567,6 @@ void main() {
//float Rt2 = Rt * Rt; // in Km
//float Rg2 = Rg * Rg; // in Km
for (int i = 0; i < nSamples; i++) {
// Color from G-Buffer
//vec4 color = texelFetch(mainColorTexture, fragCoords, i);
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *