mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 09:59:44 -05:00
brightness multiplied by fade and opacity
This commit is contained in:
@@ -451,7 +451,7 @@ void RenderableTimeVaryingVolume::update(const UpdateData&) {
|
||||
_raycaster->setVolumeTexture(nullptr);
|
||||
}
|
||||
_raycaster->setStepSize(_stepSize);
|
||||
_raycaster->setBrightness(_brightness);
|
||||
_raycaster->setBrightness(_brightness * opacity());
|
||||
_raycaster->setRNormalization(_rNormalization);
|
||||
_raycaster->setRUpperBound(_rUpperBound);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ uniform vec2 clipOffsets_#{id}[8];
|
||||
|
||||
uniform float brightness_#{id} = 1.0;
|
||||
// unitless factor that multiplies with the brightness [0,1] to achieve desired visuals.
|
||||
const float sampling_interval_reference_factor = 500.0;
|
||||
const float SamplingIntervalReferenceFactor = 500.0;
|
||||
|
||||
// Normalization factor x for radius r [0, 1].
|
||||
// value *= 1/(r^x)
|
||||
@@ -79,8 +79,8 @@ void sample#{id}(vec3 samplePos, vec3 dir, inout vec3 accumulatedColor,
|
||||
vec3 backColor = color.rgb;
|
||||
vec3 backAlpha = color.aaa;
|
||||
|
||||
backColor *= stepSize * brightness_#{id} * sampling_interval_reference_factor * clipAlpha;
|
||||
backAlpha *= stepSize * brightness_#{id} * sampling_interval_reference_factor * clipAlpha;
|
||||
backColor *= stepSize * brightness_#{id} * SamplingIntervalReferenceFactor * clipAlpha;
|
||||
backAlpha *= stepSize * brightness_#{id} * SamplingIntervalReferenceFactor * clipAlpha;
|
||||
|
||||
backColor = clamp(backColor, 0.0, 1.0);
|
||||
backAlpha = clamp(backAlpha, 0.0, 1.0);
|
||||
|
||||
Reference in New Issue
Block a user