Skip to content

Conversation

Beherith
Copy link
Contributor

@Beherith Beherith commented Apr 3, 2016

On my nvidia card, shadow2DProj().a always returned 1. Also, clamping the value + groundshadowdensity was incorrect imo, as the greater the density, the less of an effect it had because of the addition.

On my nvidia card, shadow2DProj().a always returned 1. Also, clamping the value + groundshadowdensity was incorrect imo, as the greater the density, the less of an effect it had because of the addition.
@rtri
Copy link
Contributor

rtri commented Apr 3, 2016

Seems the same logic is in TreeFragProg, which differs from model / terrain / decal shadowing.

Your fix is more sensible, but I would prefer consistent application of groundShadowDensity across all shaders [i.e. 1.0 - (1.0 - shadowCoeff) * groundShadowDensity == mix(1.0, shadowCoeff, groundShadowDensity), no clamping] to a third variant.

@Beherith
Copy link
Contributor Author

Beherith commented Apr 4, 2016

I agree with your consistent application, the difference is minor,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants