Clamp penumbra taps

This commit is contained in:
Lubos Lenco 2017-12-04 23:37:45 +01:00
parent 9a20302114
commit 5eeefe3fdd
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ void main() {
fragColor = sm * blurWeights[0];
float weight = blurWeights[0];
float d = texture(dist, texCoord).r;
int numTaps = min(int(d * 10 * penumbraScale), 10 * penumbraScale);
int numTaps = clamp(int(d * 10 * penumbraScale), 2, 10 * penumbraScale);
#ifdef _PenumbraScale
for (int i = 1; i < numTaps; ++i) weight += doBlur(blurWeights[int(i / penumbraScale)], i, nor, texCoord);
#else

View file

@ -108,8 +108,8 @@ def update_preset(self, context):
rpdat.arm_diffuse_model = 'Lambert'
elif self.rp_preset == 'Max (Render)':
rpdat.rp_renderer = 'Deferred'
rpdat.rp_shadowmap = '4096'
rpdat.rp_shadowmap_cascades = '4'
rpdat.rp_shadowmap = '8192'
rpdat.rp_shadowmap_cascades = '1'
rpdat.rp_translucency_state = 'Auto'
rpdat.rp_overlays_state = 'Auto'
rpdat.rp_decals_state = 'Auto'