mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 08:49:20 -05:00
Changing texture units use in ATM.
This commit is contained in:
@@ -83,11 +83,11 @@ return {
|
||||
Modules = {
|
||||
"sun",
|
||||
--"atmosphereearth",
|
||||
"lodglobes/earth",
|
||||
--"lodglobes/moon",
|
||||
--"moon",
|
||||
--"atmospheremars",
|
||||
--"lodglobes/mars",
|
||||
--"moon",
|
||||
"lodglobes/earth",
|
||||
"lodglobes/moon",
|
||||
"lodglobes/mars",
|
||||
--"toyvolume",
|
||||
--"earth",
|
||||
--"stars",
|
||||
|
||||
+1
-1
Submodule ext/ghoul updated: 8afa0763b1...e617294466
@@ -248,20 +248,17 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData & renderData, const D
|
||||
program.setUniform("sunDirectionObj", glm::normalize(glm::dvec3(sunPosObj)));
|
||||
//program.setUniform("_performShading", _performShading);
|
||||
|
||||
ghoul::opengl::TextureUnit transmittanceTableTextureUnit;
|
||||
transmittanceTableTextureUnit.activate();
|
||||
_transmittanceTableTextureUnit.activate();
|
||||
glBindTexture(GL_TEXTURE_2D, _transmittanceTableTexture);
|
||||
program.setUniform("transmittanceTexture", transmittanceTableTextureUnit);
|
||||
program.setUniform("transmittanceTexture", _transmittanceTableTextureUnit);
|
||||
|
||||
ghoul::opengl::TextureUnit irradianceTableTextureUnit;
|
||||
irradianceTableTextureUnit.activate();
|
||||
_irradianceTableTextureUnit.activate();
|
||||
glBindTexture(GL_TEXTURE_2D, _irradianceTableTexture);
|
||||
program.setUniform("irradianceTexture", irradianceTableTextureUnit);
|
||||
program.setUniform("irradianceTexture", _irradianceTableTextureUnit);
|
||||
|
||||
ghoul::opengl::TextureUnit inScatteringTableTextureUnit;
|
||||
inScatteringTableTextureUnit.activate();
|
||||
_inScatteringTableTextureUnit.activate();
|
||||
glBindTexture(GL_TEXTURE_3D, _inScatteringTableTexture);
|
||||
program.setUniform("inscatterTexture", inScatteringTableTextureUnit);
|
||||
program.setUniform("inscatterTexture", _inScatteringTableTextureUnit);
|
||||
|
||||
// DEBUG:
|
||||
if (_renderableClass == RenderablePlanet) {
|
||||
@@ -378,7 +375,12 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData & renderData, const D
|
||||
|
||||
void AtmosphereDeferredcaster::postRaycast(const RenderData & renderData, const DeferredcastData& deferredData,
|
||||
ghoul::opengl::ProgramObject& program)
|
||||
{}
|
||||
{
|
||||
// Deactivate the texture units
|
||||
/*_transmittanceTableTextureUnit.activate();
|
||||
_irradianceTableTextureUnit.activate();
|
||||
_inScatteringTableTextureUnit.activate();*/
|
||||
}
|
||||
|
||||
std::string AtmosphereDeferredcaster::getDeferredcastPath() const {
|
||||
return GlslDeferredcastPath;
|
||||
|
||||
@@ -159,6 +159,10 @@ private:
|
||||
GLuint _atmosphereTexture;
|
||||
GLuint _atmosphereDepthTexture;
|
||||
|
||||
ghoul::opengl::TextureUnit _transmittanceTableTextureUnit;
|
||||
ghoul::opengl::TextureUnit _irradianceTableTextureUnit;
|
||||
ghoul::opengl::TextureUnit _inScatteringTableTextureUnit;
|
||||
|
||||
// Atmosphere Data
|
||||
bool _atmosphereCalculated;
|
||||
bool _atmosphereEnabled;
|
||||
|
||||
@@ -962,10 +962,10 @@ void main() {
|
||||
//vec4 finalRadiance = vec4(HDR(sunColor), 1.0);
|
||||
//vec4 finalRadiance = vec4(sunColor, 1.0);
|
||||
//vec4 finalRadiance = vec4(HDR(inscatterColor + groundColor + sunColor), 1.0);
|
||||
vec4 finalRadiance = vec4(HDR(inscatterColor + groundColor + sunColor + meanColor.xyz), 1.0);
|
||||
//if ( finalRadiance.xyz == vec3(0.0))
|
||||
// finalRadiance.w = 0.0;
|
||||
|
||||
|
||||
// The meanColor is temporary here
|
||||
vec4 finalRadiance = vec4(HDR(inscatterColor + groundColor + sunColor + meanColor.xyz), 1.0);
|
||||
|
||||
//renderTarget = finalRadiance + meanColor;
|
||||
renderTarget = finalRadiance;
|
||||
//renderTarget = vec4(normalize(meanNormal.xyz), 1.0);
|
||||
|
||||
+4
-4
@@ -7,18 +7,18 @@ return {
|
||||
-- occurs in a single window, a fisheye projection, or a dome cluster system
|
||||
|
||||
-- A regular 1280x720 window
|
||||
SGCTConfig = sgct.config.single{},
|
||||
--SGCTConfig = sgct.config.single{},
|
||||
|
||||
-- SGCTConfig = sgct.config.single{res={1920, 1080}, shared=true},
|
||||
|
||||
-- A regular 1920x1080 window
|
||||
-- SGCTConfig = sgct.config.single{1920, 1080},
|
||||
SGCTConfig = sgct.config.single{1920, 1080},
|
||||
|
||||
-- A 1k fisheye rendering
|
||||
-- SGCTConfig = sgct.config.fisheye{1024, 1024},
|
||||
--SGCTConfig = sgct.config.fisheye{1024, 1024},
|
||||
|
||||
-- A 4k fisheye rendering in a 1024x1024 window
|
||||
-- SGCTConfig = sgct.config.fisheye{1024, 1024, res={4096, 4096}, quality="2k", tilt=27},
|
||||
--SGCTConfig = sgct.config.fisheye{1024, 1024, res={4096, 4096}, quality="2k", tilt=27},
|
||||
|
||||
--SGCTConfig = "${SGCT}/openvr_oculusRiftCv1.xml",
|
||||
--SGCTConfig = "${SGCT}/openvr_htcVive.xml",
|
||||
|
||||
Reference in New Issue
Block a user