Skip to content

Commit

Permalink
Merge branch 'forest-shading' of https://github.com/doodlum/skyrim-co…
Browse files Browse the repository at this point in the history
…mmunity-shaders into forest-shading
  • Loading branch information
doodlum committed Feb 19, 2025
2 parents 987a33d + 38f7362 commit 107bba8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package/Shaders/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -2449,14 +2449,14 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
float3 vertexColor = lerp(1, TintColor.xyz, input.Color.y);
# elif defined(SKYLIGHTING)
float3 vertexColor = input.Color.xyz;
if (!SharedData::InInterior && (Permutation::ExtraShaderDescriptor & Permutation::ExtraFlags::IsTree)){
if (!SharedData::InInterior && (Permutation::ExtraShaderDescriptor & Permutation::ExtraFlags::IsTree)) {
// Remove AO
float3 normalizedColor = normalize(vertexColor);
float maxChannel = max(max(normalizedColor.r, normalizedColor.g), normalizedColor.b);
float maxChannel = max(max(normalizedColor.r, normalizedColor.g), normalizedColor.b);
vertexColor = normalizedColor / maxChannel;
vertexColor = lerp(input.Color.xyz, vertexColor, skylightingFadeOutFactor);
}
# else
# else
float3 vertexColor = input.Color.xyz;
# endif // defined (HAIR)

Expand Down

0 comments on commit 107bba8

Please sign in to comment.