mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-27 14:39:20 -06:00
Fixed HDR controls for multiple atm's.
This commit is contained in:
@@ -65,6 +65,9 @@ ABufferRenderer::ABufferRenderer()
|
||||
, _dirtyRendererData(true)
|
||||
, _dirtyResolveDictionary(true)
|
||||
, _resolveProgram(nullptr)
|
||||
, _hdrExposure(0.4)
|
||||
, _hdrBackground(2.8)
|
||||
, _gamma(2.2)
|
||||
{}
|
||||
|
||||
ABufferRenderer::~ABufferRenderer() {}
|
||||
@@ -406,6 +409,27 @@ void ABufferRenderer::setHDRExposure(const float hdrExposure) {
|
||||
}
|
||||
}
|
||||
|
||||
void ABufferRenderer::setHDRBackground(const float hdrBackground) {
|
||||
_hdrBackground = hdrBackground;
|
||||
if (_hdrBackground < 0.0) {
|
||||
LERROR("HDR Background constant must be greater than zero.");
|
||||
_hdrBackground = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ABufferRenderer::setGamma(const float gamma) {
|
||||
_gamma = gamma;
|
||||
if (_gamma < 0.0) {
|
||||
LERROR("Gamma value must be greater than zero.");
|
||||
_gamma = 2.2;
|
||||
}
|
||||
}
|
||||
|
||||
float ABufferRenderer::hdrBackground() const {
|
||||
return _hdrBackground;
|
||||
}
|
||||
|
||||
void ABufferRenderer::clear() {
|
||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, _anchorPointerTextureInitializer);
|
||||
glBindTexture(GL_TEXTURE_2D, _anchorPointerTexture);
|
||||
|
||||
Reference in New Issue
Block a user