summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Main.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/Main.cpp b/Main.cpp
index e842bd0..2310d4f 100644
--- a/Main.cpp
+++ b/Main.cpp
@@ -271,6 +271,18 @@ void precompute()
glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA16F_ARB, RES_MU_S * RES_NU, RES_MU, RES_R, 0, GL_RGB, GL_FLOAT, NULL);
free(pixels);
+ vector<string> files;
+ files.clear();
+ files.push_back("Main.h");
+ files.push_back("common.glsl");
+ files.push_back("earth.glsl");
+ drawProg = loadProgram(files);
+ glUseProgram(drawProg);
+ glUniform1i(glGetUniformLocation(drawProg, "reflectanceSampler"), reflectanceUnit);
+ // glUniform1i(glGetUniformLocation(drawProg, "transmittanceSampler"), transmittanceUnit);
+ glUniform1i(glGetUniformLocation(drawProg, "irradianceSampler"), irradianceUnit);
+ glUniform1i(glGetUniformLocation(drawProg, "inscatterSampler"), inscatterUnit);
+
#else
glActiveTexture(GL_TEXTURE0 + transmittanceUnit);
@@ -555,9 +567,9 @@ void precompute()
fclose(f);
free(pixels);
#endif
-#endif
glUseProgram(drawProg);
+#endif
}
void recompute()