mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 16:43:33 +02:00
Reduced blur taps for better performance and limited normal attenuation distance
This commit is contained in:
parent
f6ffbef60d
commit
6dd6218b77
2 changed files with 3 additions and 3 deletions
|
@ -316,7 +316,7 @@ void BloomConfig::setSize(float value) {
|
|||
assert(blurJobIt != task->_jobs.end());
|
||||
auto& gaussianBlur = blurJobIt->edit<render::BlurGaussian>();
|
||||
auto gaussianBlurParams = gaussianBlur.getParameters();
|
||||
gaussianBlurParams->setFilterGaussianTaps(7, sigma);
|
||||
gaussianBlurParams->setFilterGaussianTaps(5, sigma);
|
||||
}
|
||||
auto blurJobIt = task->getJob("BloomApply");
|
||||
assert(blurJobIt != task->_jobs.end());
|
||||
|
|
|
@ -235,8 +235,8 @@ vec3 fetchLightmapMap(vec2 uv) {
|
|||
vec3 normalizedTangent = normalize(<$interpolatedTangent$>.xyz);
|
||||
vec3 normalizedBitangent = cross(normalizedNormal, normalizedTangent);
|
||||
// attenuate the normal map divergence from the mesh normal based on distance
|
||||
// The attenuation range [100,300] meters from the eye is arbitrary for now
|
||||
vec3 localNormal = mix(<$fetchedNormal$>, vec3(0.0, 1.0, 0.0), smoothstep(100.0, 300.0, (-<$fragPos$>).z));
|
||||
// The attenuation range [50,200] meters from the eye is arbitrary for now
|
||||
vec3 localNormal = mix(<$fetchedNormal$>, vec3(0.0, 1.0, 0.0), smoothstep(50.0, 200.0, (-<$fragPos$>).z));
|
||||
<$normal$> = vec3(normalizedBitangent * localNormal.x + normalizedNormal * localNormal.y + normalizedTangent * localNormal.z);
|
||||
}
|
||||
<@endfunc@>
|
||||
|
|
Loading…
Reference in a new issue