Skip to content

Commit

Permalink
tweak attenuation
Browse files Browse the repository at this point in the history
  • Loading branch information
null511 committed Oct 22, 2023
1 parent fcbaf3d commit 8116e8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shaders/lib/lighting/sampling.glsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
float GetLightAttenuation(const in vec3 lightVec, const in float lightRange) {
float lightDist = length(lightVec);
float lightAtt = 1.0 - saturate(lightDist / lightRange);
return _pow3(lightAtt);
return pow5(lightAtt);
}

float GetLightNoL(const in float geoNoL, const in vec3 texNormal, const in vec3 lightDir, const in float sss) {
Expand Down
2 changes: 1 addition & 1 deletion shaders/program/shadowcomp1.csh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ float GetLpvBounceF(const in ivec3 gridBlockCell, const in ivec3 blockOffset) {

vec3 sampleColor = textureLod(shadowcolor0, shadowPos.xy, 0).rgb;
sampleColor = RGBToLinear(sampleColor);
//sampleColor = _pow2(sampleColor);
sampleColor = 10.0 * _pow3(sampleColor);

float texDepth = texture(shadowtex1, shadowPos.xy).r;
float shadowDist = texDepth - shadowPos.z;
Expand Down

0 comments on commit 8116e8b

Please sign in to comment.