Turned off jitter with FXAA

This commit is contained in:
Olivier Prat 2018-05-15 15:09:02 +02:00
parent bed7752a1a
commit d10b5a16f2

View file

@ -482,16 +482,14 @@ JitterSample::SampleSequence::SampleSequence(){
} }
void JitterSample::configure(const Config& config) { void JitterSample::configure(const Config& config) {
_freeze = config.freeze; _freeze = config.stop || config.freeze;
if (config.stop || _freeze) { if (config.freeze) {
auto pausedIndex = config.getIndex(); auto pausedIndex = config.getIndex();
if (_sampleSequence.currentIndex != pausedIndex) { if (_sampleSequence.currentIndex != pausedIndex) {
_sampleSequence.currentIndex = pausedIndex; _sampleSequence.currentIndex = pausedIndex;
} }
} else { } else if (config.stop) {
if (_sampleSequence.currentIndex < 0) { _sampleSequence.currentIndex = -1;
_sampleSequence.currentIndex = config.getIndex();
}
} }
_scale = config.scale; _scale = config.scale;
} }
@ -505,7 +503,12 @@ void JitterSample::run(const render::RenderContextPointer& renderContext, Output
current = -1; current = -1;
} }
} }
jitter = _sampleSequence.offsets[(current < 0 ? SEQUENCE_LENGTH : current)];
jitter.x = 0.0f;
jitter.y = 0.0f;
if (current >= 0) {
jitter = _sampleSequence.offsets[current];
}
} }