mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-27 22:49:39 -06:00
- Add currentDrawBufferResolution method in WindowWrapper
- Base renderer resolution on draw buffer resolution instead of window res - Obtain number of aa samples from config file, instead of hard coding to eight samples
This commit is contained in:
@@ -96,6 +96,12 @@ void ABufferRenderer::initialize() {
|
||||
"${SHADERS}/abuffer/resolveabuffer.frag",
|
||||
dict);
|
||||
|
||||
_nAaSamples = OsEng.windowWrapper().currentNumberOfAaSamples();
|
||||
if (_nAaSamples > 8) {
|
||||
LERROR("ABuffer does not support more than 8 MSAA samples.");
|
||||
_nAaSamples = 8;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ABufferRenderer::deinitialize() {
|
||||
@@ -163,6 +169,7 @@ void ABufferRenderer::render(float blackoutFactor, bool doPerformanceMeasurement
|
||||
// Step 3: Resolve the buffer
|
||||
_resolveProgram->activate();
|
||||
_resolveProgram->setUniform("blackoutFactor", blackoutFactor);
|
||||
_resolveProgram->setUniform("nAaSamples", _nAaSamples);
|
||||
// todo: pre-ray-cast for each volume
|
||||
glBindVertexArray(_screenQuad);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||
|
||||
Reference in New Issue
Block a user