Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
c6a84c1
feat(skylighting): improved skylighting
doodlum Feb 18, 2025
a4592f7
fix(grass lighting): grass shading
doodlum Feb 18, 2025
634693d
style: 🎨 apply clang-format changes
doodlum Feb 18, 2025
1a8373b
chore: tweak defaults
doodlum Feb 18, 2025
8190542
Merge branch 'forest-shading' of https://github.com/doodlum/skyrim-co…
doodlum Feb 18, 2025
e27c483
chore: skip skylighting in interiors
doodlum Feb 18, 2025
2f95395
style: 🎨 apply clang-format changes
doodlum Feb 18, 2025
90666d6
fix: grass shading
doodlum Feb 18, 2025
00dea93
style: 🎨 apply clang-format changes
doodlum Feb 18, 2025
a446205
chore: more shading improvements
doodlum Feb 18, 2025
dced221
Merge branch 'forest-shading' of https://github.com/doodlum/skyrim-co…
doodlum Feb 18, 2025
beac9d6
style: 🎨 apply clang-format changes
doodlum Feb 18, 2025
a182442
chore: tweak ssgi
doodlum Feb 18, 2025
e77311b
Merge branch 'forest-shading' of https://github.com/doodlum/skyrim-co…
doodlum Feb 18, 2025
dc07fba
chore: tonemapping tweaks
doodlum Feb 18, 2025
a4fed46
chore: increase ao power
doodlum Feb 18, 2025
47b94d7
chore: reduce ao power
doodlum Feb 19, 2025
01dabc2
feat(skylighting): fixed tree darkness
doodlum Feb 19, 2025
134ccda
chore: lower skylighting amount
doodlum Feb 19, 2025
c35f92d
style: 🎨 apply clang-format changes
doodlum Feb 19, 2025
15d2685
Merge branch 'forest-shading' of https://github.com/doodlum/skyrim-co…
doodlum Feb 19, 2025
61d71be
chore: cleanup
doodlum Feb 19, 2025
38f7362
style: 🎨 apply clang-format changes
doodlum Feb 19, 2025
987a33d
chore: make grass sss consistent with vanilla
doodlum Feb 19, 2025
107bba8
Merge branch 'forest-shading' of https://github.com/doodlum/skyrim-co…
doodlum Feb 19, 2025
252c7a8
chore: improved GI
doodlum Feb 19, 2025
89bfaf2
chore: grass tweaks
doodlum Feb 19, 2025
587a1fb
chore: skylighting tweaks
doodlum Feb 19, 2025
302bf5b
chore: add shadow bias to skylighting
doodlum Feb 19, 2025
d74e7a5
chore: no ssgi dimmer
doodlum Feb 19, 2025
a6158c6
chore: less aggressive skylighting
doodlum Feb 19, 2025
2721502
chore: less aggressive skylighting curve
doodlum Feb 19, 2025
047ecea
chore: remove skylighting tangent weights
doodlum Feb 19, 2025
b7c2bfe
chore: improved skylighting bias
doodlum Feb 19, 2025
e02f84c
chore: better skylighting curve
doodlum Feb 19, 2025
67b23e1
style: 🎨 apply clang-format changes
doodlum Feb 19, 2025
9b8bce1
fix: water shadow
doodlum Feb 19, 2025
b441cb5
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 19, 2025
d0e3f34
chore: tweaks to improve snow AO
doodlum Feb 20, 2025
029c925
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
983f4a3
chore: remove more baked lighting
doodlum Feb 20, 2025
c1d8498
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
bcd155e
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
05eb7ff
chore: wrapped lighting for grass
doodlum Feb 20, 2025
d0b2973
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
4d0b2b3
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
e6adc7c
chore: tweak grass defaults
doodlum Feb 20, 2025
4928481
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
ee90145
chore: more to reduce overdarkening
doodlum Feb 20, 2025
0dff1de
chore: compensate for less thick ao
doodlum Feb 20, 2025
ed790fa
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
b681c32
chore: more to mitigate snow darkness
doodlum Feb 20, 2025
0378eac
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
551c5d8
chore: remove sqrt
doodlum Feb 20, 2025
0b1c388
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
1c079ea
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
eb89f88
chore: reduce gi strength
doodlum Feb 20, 2025
52da1ac
chore: change specular skylighting sample direction
doodlum Feb 20, 2025
ca1add7
chore: tweak more grass lighting defaults
doodlum Feb 20, 2025
e6458a4
chore: decrease specular
doodlum Feb 20, 2025
c7e41c3
fix: enderal trees lighting
doodlum Feb 20, 2025
1670386
feat: improved specular AO
doodlum Feb 20, 2025
52bb9b2
fix: skyboost
doodlum Feb 20, 2025
d17df66
chore: brighten skylighting on trees
doodlum Feb 20, 2025
b15324d
chore: brighten skylighting on trees
doodlum Feb 20, 2025
b23608c
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
8abc4ec
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
552820e
chore: brighten skylighting on all vertex ao
doodlum Feb 20, 2025
43f3201
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
255ffe4
chore: tweak ao
doodlum Feb 20, 2025
4c6f851
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
a66ad0c
feat: fix shadow bias via skylighting
doodlum Feb 20, 2025
9843dc1
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
96a7ea0
fix: bad default grass settings
doodlum Feb 20, 2025
3d10ee6
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
a2c4672
chore: redo skylighting boost
doodlum Feb 20, 2025
4d9d766
style: 🎨 apply clang-format changes
doodlum Feb 20, 2025
3cd7fc2
fix: upscaler shimmering
doodlum Feb 20, 2025
2751c9b
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 20, 2025
d2eac33
chore: put backlighting boost back
doodlum Feb 21, 2025
3d51218
style: 🎨 apply clang-format changes
doodlum Feb 21, 2025
c2d0d83
chore: revert gamma
doodlum Feb 21, 2025
47786f5
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 21, 2025
5f1945e
fix: backlighting direction
doodlum Feb 21, 2025
e020209
feat: view dependant wrapping
doodlum Feb 21, 2025
e8dcca4
style: 🎨 apply clang-format changes
doodlum Feb 21, 2025
9629ed0
chore: try to improve grass collision
doodlum Feb 21, 2025
672982a
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 21, 2025
ae3525a
style: 🎨 apply clang-format changes
doodlum Feb 21, 2025
316da26
feat: vanilla fresnel
doodlum Feb 21, 2025
33f0806
Merge branch 'forest-shading-2' of https://github.com/doodlum/skyrim-…
doodlum Feb 21, 2025
51e5aef
chore: increase grass collision amount
doodlum Feb 26, 2025
8304378
fix: grass brightness
doodlum Feb 26, 2025
94ec47c
chore: less aggressive upscale color bias
doodlum Feb 26, 2025
afe0761
fix: lighting in blackreach
doodlum Feb 26, 2025
551441f
fix: grass typo (#986)
ThePagi Mar 2, 2025
2d0985f
fix: typo (#985)
ThePagi Mar 2, 2025
c8be06c
fix(pbr): lod land blend matching (#983)
ThePagi Mar 2, 2025
8dff5d7
Merge branch 'dev' into forest-shading-2
doodlum Mar 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions package/Shaders/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,6 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
float lodBlendMask = TexLandLodBlend2Sampler.Sample(SampLandLodBlend2Sampler, 3.0.xx * input.TexCoord0.zw).x;
float lodLandFadeFactor = GetLodLandBlendMultiplier(lodBlendParameter, lodBlendMask);
float lodLandBlendFactor = LODTexParams.z * input.LandBlendWeights2.w;

normal.xyz = lerp(normal.xyz, float3(0, 0, 1), lodLandBlendFactor);

# if !defined(TRUE_PBR)
Expand Down Expand Up @@ -1776,7 +1775,6 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
float3 specularColorPBR = 0;
float3 transmissionColor = 0;

float pbrWeight = 1;
float pbrGlossiness = 1 - pbrSurfaceProperties.Roughness;
# endif // TRUE_PBR

Expand Down Expand Up @@ -1979,6 +1977,16 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
if (dirShadow != 0.0 && (inWorld || inReflection))
dirShadow *= ShadowSampling::GetWorldShadow(input.WorldPosition, FrameBuffer::CameraPosAdjust[eyeIndex], eyeIndex);

# if defined(SKYLIGHTING)
float skylightingFadeOutFactor = 1.0;
if (!SharedData::InInterior) {
skylightingFadeOutFactor = Skylighting::getFadeOutFactor(input.WorldPosition.xyz);
// Shadow bias fix
float skylightingDirShadow = saturate(SphericalHarmonics::Unproject(skylightingSH, SharedData::DirLightDirection.xyz));
dirShadow *= lerp(1.0, skylightingDirShadow * skylightingDirShadow, skylightingFadeOutFactor);
}
# endif

dirLightColorMultiplier *= dirShadow;

float3 diffuseColor = 0.0.xxx;
Expand Down Expand Up @@ -2408,7 +2416,7 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
# if defined(SKYLIGHTING)
envColor = DynamicCubemaps::GetDynamicCubemap(worldSpaceNormal, worldSpaceVertexNormal, worldSpaceViewDirection, envRoughness, F0, skylightingSH) * envMask;
# else
envColor = DynamicCubemaps::GetDynamicCubemap(worldSpaceNormal, worldSpaceVertexNormal, worldSpaceViewDirection, envRoughness, F0, ) * envMask;
envColor = DynamicCubemaps::GetDynamicCubemap(worldSpaceNormal, worldSpaceVertexNormal, worldSpaceViewDirection, envRoughness, F0) * envMask;
# endif
else
envColor = 0.0;
Expand Down Expand Up @@ -2597,22 +2605,23 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace

# if defined(LOD_LAND_BLEND) && defined(TRUE_PBR)
{
pbrWeight = 1 - lodLandBlendFactor;

float3 litLodLandColor = vertexColor * lodLandColor.xyz * lodLandFadeFactor * lodLandDiffuseColor;
color.xyz = lerp(color.xyz, litLodLandColor, lodLandBlendFactor);
# if defined(DEFERRED) && defined(SSGI)
lodLandDiffuseColor += directionalAmbientColorDirect;
# else
lodLandDiffuseColor += directionalAmbientColor;
# endif
float3 litLodLandColor = vertexColor * lodLandColor * lodLandFadeFactor * lodLandDiffuseColor;
color.xyz = lerp(color.xyz * Color::PBRLightingScale, litLodLandColor, lodLandBlendFactor);

specularColorPBR = lerp(specularColorPBR, 0, lodLandBlendFactor);
indirectDiffuseLobeWeight = lerp(indirectDiffuseLobeWeight, input.Color.xyz * lodLandColor * lodLandFadeFactor, lodLandBlendFactor);
specularColor = lerp(specularColorPBR * Color::PBRLightingScale, 0, lodLandBlendFactor);
indirectDiffuseLobeWeight = lerp(indirectDiffuseLobeWeight, vertexColor * lodLandColor * lodLandFadeFactor, lodLandBlendFactor);
indirectSpecularLobeWeight = lerp(indirectSpecularLobeWeight, 0, lodLandBlendFactor);
pbrGlossiness = lerp(pbrGlossiness, 0, lodLandBlendFactor);
}
# endif // defined(LOD_LAND_BLEND) && defined(TRUE_PBR)

# if defined(TRUE_PBR)
# elif defined(TRUE_PBR)
color.xyz *= Color::PBRLightingScale;
specularColorPBR *= Color::PBRLightingScale;
specularColor += specularColorPBR;
specularColor = specularColorPBR;
# endif

# if !defined(DEFERRED)
Expand Down
2 changes: 1 addition & 1 deletion package/Shaders/RunGrass.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ PS_OUTPUT main(PS_INPUT input)
float4 baseColor = TexBaseSampler.SampleBias(SampBaseSampler, input.TexCoord.xy, SharedData::MipBias);

# if defined(RENDER_DEPTH)
float diffuseAlpha = input.DiffuseColor.w * baseColor.w;
float diffuseAlpha = input.VertexColor.w * baseColor.w;

if ((diffuseAlpha - AlphaTestRefRS) < 0) {
discard;
Expand Down