mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
making the 9 fetch the default for the constraining pass
This commit is contained in:
parent
3e1c2bdb48
commit
dbdcef3d33
4 changed files with 16 additions and 18 deletions
|
@ -336,7 +336,7 @@ void Antialiasing::run(const render::RenderContextPointer& renderContext, const
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
_antialiasingBuffer[i] = gpu::FramebufferPointer(gpu::Framebuffer::create("antialiasing"));
|
_antialiasingBuffer[i] = gpu::FramebufferPointer(gpu::Framebuffer::create("antialiasing"));
|
||||||
auto format = gpu::Element::COLOR_SRGBA_32; // DependencyManager::get<FramebufferCache>()->getLightingTexture()->getTexelFormat();
|
auto format = gpu::Element::COLOR_SRGBA_32; // DependencyManager::get<FramebufferCache>()->getLightingTexture()->getTexelFormat();
|
||||||
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_POINT);
|
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR);
|
||||||
_antialiasingTexture[i] = gpu::Texture::createRenderBuffer(format, width, height, gpu::Texture::SINGLE_MIP, defaultSampler);
|
_antialiasingTexture[i] = gpu::Texture::createRenderBuffer(format, width, height, gpu::Texture::SINGLE_MIP, defaultSampler);
|
||||||
_antialiasingBuffer[i]->setRenderBuffer(0, _antialiasingTexture[i]);
|
_antialiasingBuffer[i]->setRenderBuffer(0, _antialiasingTexture[i]);
|
||||||
}
|
}
|
||||||
|
@ -490,6 +490,10 @@ void JitterSample::configure(const Config& config) {
|
||||||
if (_jitterBuffer->currentIndex != pausedIndex) {
|
if (_jitterBuffer->currentIndex != pausedIndex) {
|
||||||
_jitterBuffer.edit().currentIndex = pausedIndex;
|
_jitterBuffer.edit().currentIndex = pausedIndex;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (_jitterBuffer->currentIndex == SampleSequence::SEQUENCE_LENGTH) {
|
||||||
|
_jitterBuffer.edit().currentIndex = config.getIndex();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_scale = config.scale;
|
_scale = config.scale;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ void main() {
|
||||||
// Debug region before debug or fxaa region X
|
// Debug region before debug or fxaa region X
|
||||||
float distToRegionFXAA = fragUV.x - taa_getRegionFXAA().x;
|
float distToRegionFXAA = fragUV.x - taa_getRegionFXAA().x;
|
||||||
if (distToRegionFXAA > 0.0) {
|
if (distToRegionFXAA > 0.0) {
|
||||||
outFragColor = vec4(taa_evalTXAA(fragUV), 1.0);
|
outFragColor = vec4(taa_evalFXAA(fragUV), 1.0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
||||||
|
|
||||||
vec3 sourceColor;
|
vec3 sourceColor;
|
||||||
vec3 historyColor;
|
vec3 historyColor;
|
||||||
vec2 prevFragUV = taa_fetchSourceAndHistory(fragUV, fragVel, sourceColor, historyColor);
|
vec2 prevFragUV = taa_fetchSourceAndHistory(nearFragUV.xy, fragVel, sourceColor, historyColor);
|
||||||
|
|
||||||
vec3 nextColor = mix(historyColor, sourceColor, params.blend);
|
vec3 nextColor = mix(historyColor, sourceColor, params.blend);
|
||||||
|
|
||||||
|
|
|
@ -219,8 +219,7 @@ mat3 taa_evalNeighbourColorRegion(vec3 sourceColor, vec2 fragUV, vec2 fragVeloci
|
||||||
vec2 texelSize = getInvWidthHeight();
|
vec2 texelSize = getInvWidthHeight();
|
||||||
vec3 cmin, cmax, cavg;
|
vec3 cmin, cmax, cavg;
|
||||||
|
|
||||||
if (taa_constrainColor9Taps()) {
|
#if MINMAX_3X3_ROUNDED
|
||||||
|
|
||||||
vec2 du = vec2(texelSize.x, 0.0);
|
vec2 du = vec2(texelSize.x, 0.0);
|
||||||
vec2 dv = vec2(0.0, texelSize.y);
|
vec2 dv = vec2(0.0, texelSize.y);
|
||||||
|
|
||||||
|
@ -228,7 +227,7 @@ mat3 taa_evalNeighbourColorRegion(vec3 sourceColor, vec2 fragUV, vec2 fragVeloci
|
||||||
vec3 ctc = taa_fetchSourceMap(fragUV - dv).rgb;
|
vec3 ctc = taa_fetchSourceMap(fragUV - dv).rgb;
|
||||||
vec3 ctr = taa_fetchSourceMap(fragUV - dv + du).rgb;
|
vec3 ctr = taa_fetchSourceMap(fragUV - dv + du).rgb;
|
||||||
vec3 cml = taa_fetchSourceMap(fragUV - du).rgb;
|
vec3 cml = taa_fetchSourceMap(fragUV - du).rgb;
|
||||||
vec3 cmc = taa_fetchSourceMap(fragUV).rgb; // could resuse the same osurce sample isn't it ?
|
vec3 cmc = sourceColor; //taa_fetchSourceMap(fragUV).rgb; // could resuse the same osurce sample isn't it ?
|
||||||
vec3 cmr = taa_fetchSourceMap(fragUV + du).rgb;
|
vec3 cmr = taa_fetchSourceMap(fragUV + du).rgb;
|
||||||
vec3 cbl = taa_fetchSourceMap(fragUV + dv - du).rgb;
|
vec3 cbl = taa_fetchSourceMap(fragUV + dv - du).rgb;
|
||||||
vec3 cbc = taa_fetchSourceMap(fragUV + dv).rgb;
|
vec3 cbc = taa_fetchSourceMap(fragUV + dv).rgb;
|
||||||
|
@ -251,7 +250,7 @@ mat3 taa_evalNeighbourColorRegion(vec3 sourceColor, vec2 fragUV, vec2 fragVeloci
|
||||||
cmax = 0.5 * (cmax + cmax5);
|
cmax = 0.5 * (cmax + cmax5);
|
||||||
cavg = 0.5 * (cavg + cavg5);
|
cavg = 0.5 * (cavg + cavg5);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
#else
|
||||||
const float _SubpixelThreshold = 0.5;
|
const float _SubpixelThreshold = 0.5;
|
||||||
const float _GatherBase = 0.5;
|
const float _GatherBase = 0.5;
|
||||||
const float _GatherSubpixelMotion = 0.1666;
|
const float _GatherSubpixelMotion = 0.1666;
|
||||||
|
@ -277,7 +276,7 @@ mat3 taa_evalNeighbourColorRegion(vec3 sourceColor, vec2 fragUV, vec2 fragVeloci
|
||||||
#elif
|
#elif
|
||||||
cavg = (cmin + cmax ) * 0.5;
|
cavg = (cmin + cmax ) * 0.5;
|
||||||
#endif
|
#endif
|
||||||
}
|
#endif
|
||||||
|
|
||||||
// shrink chroma min-max
|
// shrink chroma min-max
|
||||||
#if USE_YCOCG
|
#if USE_YCOCG
|
||||||
|
@ -373,7 +372,7 @@ vec3 taa_getVelocityColorAboveThreshold(float velocityPixLength) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vec3 taa_evalTXAA(vec2 fragUV) {
|
vec3 taa_evalFXAA(vec2 fragUV) {
|
||||||
|
|
||||||
vec2 texelSize = getInvWidthHeight();
|
vec2 texelSize = getInvWidthHeight();
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Separator {}
|
||||||
Row {
|
Row {
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
|
@ -64,11 +65,11 @@ Rectangle {
|
||||||
text: {
|
text: {
|
||||||
var state = 2 - (Render.getConfig("RenderMainView.JitterCam").freeze * 1 - Render.getConfig("RenderMainView.JitterCam").stop * 2);
|
var state = 2 - (Render.getConfig("RenderMainView.JitterCam").freeze * 1 - Render.getConfig("RenderMainView.JitterCam").stop * 2);
|
||||||
if (state === 2) {
|
if (state === 2) {
|
||||||
return ">>"
|
return "Jitter"
|
||||||
} else if (state === 1) {
|
} else if (state === 1) {
|
||||||
return "|" + Render.getConfig("RenderMainView.JitterCam").index + "|"
|
return "Paused at " + Render.getConfig("RenderMainView.JitterCam").index + ""
|
||||||
} else {
|
} else {
|
||||||
return "[]"
|
return "No Jitter"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: { Render.getConfig("RenderMainView.JitterCam").cycleStopPauseRun(); }
|
onClicked: { Render.getConfig("RenderMainView.JitterCam").cycleStopPauseRun(); }
|
||||||
|
@ -106,12 +107,6 @@ Rectangle {
|
||||||
checked: Render.getConfig("RenderMainView.Antialiasing")["constrainColor"]
|
checked: Render.getConfig("RenderMainView.Antialiasing")["constrainColor"]
|
||||||
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["constrainColor"] = checked }
|
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["constrainColor"] = checked }
|
||||||
}
|
}
|
||||||
HifiControls.CheckBox {
|
|
||||||
boxSize: 20
|
|
||||||
text: "Constrain color 9 Taps"
|
|
||||||
checked: Render.getConfig("RenderMainView.Antialiasing")["constrainColor9Taps"]
|
|
||||||
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["constrainColor9Taps"] = checked }
|
|
||||||
}
|
|
||||||
HifiControls.CheckBox {
|
HifiControls.CheckBox {
|
||||||
boxSize: 20
|
boxSize: 20
|
||||||
text: "Clip / Clamp History color"
|
text: "Clip / Clamp History color"
|
||||||
|
|
Loading…
Reference in a new issue