-
Notifications
You must be signed in to change notification settings - Fork 92
feat: Snow Cover #1369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ThePagi
wants to merge
140
commits into
doodlum:dev
Choose a base branch
from
ThePagi:snow2
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,582
−89
Open
feat: Snow Cover #1369
Changes from 135 commits
Commits
Show all changes
140 commits
Select commit
Hold shift + click to select a range
215019b
before switching noise to textures
800af47
style: 🎨 apply clang-format changes
ThePagi 7b148c4
basic texture use
1300316
Merge branch 'snow' of https://github.com/ThePagi/skyrim-community-sh…
0fe99a8
style: 🎨 apply clang-format changes
ThePagi 0315a85
Merge branch 'snow' of https://github.com/ThePagi/skyrim-community-sh…
055d4f6
buffer fixes
7b4e721
style: 🎨 apply clang-format changes
ThePagi 6832302
Merge branch 'dev' into snow
c52f1ca
working basic seasons and lod snow, first test
8c0ae29
style: 🎨 apply clang-format changes
ThePagi 64f01ad
fade out near water
8225953
Merge branch 'snow' of https://github.com/ThePagi/skyrim-community-sh…
e130380
style: 🎨 apply clang-format changes
ThePagi 923f76e
fix distant seams due to parallax
fd8105c
Merge branch 'snow' of https://github.com/ThePagi/skyrim-community-sh…
09e6ffc
style: 🎨 apply clang-format changes
ThePagi f91f6cd
Merge branch 'dev' into snow
55dac40
fix FeatureBuffer includes
ec706b0
fix removed directionaldiffuse
4097928
reorder buffers, didnt help
e7bbd5d
pad wetness, move snow buffer to the beginning
99db316
buffer order, lod land noise, lod land blend, lights remove snow
8a47c9f
style: 🎨 apply clang-format changes
ThePagi 500d608
make more gradual blending
6640fe5
style: 🎨 apply clang-format changes
ThePagi 8308d1a
Merge commit '6640fe5dfe09a4304342005a6193562993b72916' into dev
418c4bf
style: 🎨 apply clang-format changes
ThePagi adb0758
merge fixes
f491dc1
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
200c08d
style: 🎨 apply clang-format changes
ThePagi 4248c54
commonlib call fix
b1b5c45
Merge remote-tracking branch 'refs/remotes/origin/snow2' into snow2
0fc47a8
style: 🎨 apply clang-format changes
ThePagi 4cb5714
fixed merge
ThePagi 4e73185
style: 🎨 apply clang-format changes
ThePagi c94d021
basic snow is back
ThePagi 4e37ad1
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
ThePagi 6388e2e
style: 🎨 apply clang-format changes
ThePagi a6bcc28
flag movable objects
ThePagi a83ccb1
style: 🎨 apply clang-format changes
ThePagi 8e27ed7
missing namespace
ThePagi 2dd2ec4
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
ThePagi 7b83c62
Merge branch 'dev' into snow2
a287f25
style: 🎨 apply clang-format changes
ThePagi 49b9bbb
fixes
6b617d0
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
630cff5
style: 🎨 apply clang-format changes
ThePagi e901bcd
save load configs, snow and ice
7cf4ed0
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
e35a48d
style: 🎨 apply clang-format changes
ThePagi 8360695
fixes
b8c62da
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
1aa79dd
style: 🎨 apply clang-format changes
ThePagi a519e53
yes
122c9a4
style: 🎨 apply clang-format changes
ThePagi fba4e66
feat: terrain helper
hakasapl 06ff00b
fix (terrain helper): nullptr checks
hakasapl 8489aee
Merge branch 'dev' into feat-terrainhelper
hakasapl e82fba4
feat(terrain helper): Removed terrain helper from menu
hakasapl 8abbfa0
fix(Terrain Helper): ExtraFeatureDescriptor not updating when changed
hakasapl 4c1aa0b
fix (Terrain Helper): some default landscape tiles not being replaced
hakasapl 2c8567b
Merge branch 'doodlum:dev' into feat-terrainhelper
hakasapl ac9a3e0
feat(terrain helper): Added unload messages and mod link
hakasapl 6c9d0e8
fix(terrain helper): no longer call spdlog directly
hakasapl 801b07c
fix case when interior has worldspace too
0da723b
style: 🎨 apply clang-format changes
ThePagi ab91205
Merge branch 'dev' of https://github.com/ThePagi/skyrim-community-sha…
6627081
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
53144b0
style: 🎨 apply clang-format changes
ThePagi f5995c6
weather improvements
b7c719f
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
23d9e8f
style: 🎨 apply clang-format changes
ThePagi bf4ad5a
Merge branch 'dev' into snow2
3958294
Revert "Merge branch 'dev' into snow2"
bed5c1a
Merge branch 'dev' into snow2
7ef5357
forgor
37d550b
style: 🎨 apply clang-format changes
ThePagi 05d2833
better rain behavior, nicer grass and tree lod
9ff2a59
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
490769d
style: 🎨 apply clang-format changes
ThePagi ff199a6
spec, nicer grass and tree lod
282cf9d
style: 🎨 apply clang-format changes
ThePagi 3cd6343
Merge branch 'dev' into snow2
79cb5d6
small cleanup
f932f27
style: 🎨 apply clang-format changes
ThePagi 14a4421
weather bug fixes
cd720dd
style: 🎨 apply clang-format changes
ThePagi 831027a
Merge branch 'dev' into snow
c2fdcf6
update submodule smh
5b35768
change overlapping buffer indices to t38-t43
555e185
fixes, black/whitelist by formid
b99ef66
Merge branch 'dev' into snow2
d4c1cb3
blacklist based on trishape name
9b03ef4
Merge branch 'dev' into snow2
e8165e9
Update FeatureBuffer.cpp
ThePagi 2f310b2
update commonlib
687dc8e
fix regressions from merge
dac0fd7
comments in white/blacklist
29b5c4f
fix nonpbr land
07a40a9
fix fix
94cb7fe
fix land decals, add constant term to plane
3c9d477
use height offset texture instead of curved plane
541e713
add configs and offset texture, fix object lod trees and foliage hue
6a9aa61
Merge branch 'dev' into snow2
c0f2ec4
default values match included config, better tree lod detectionL
6c0e4fc
fix animobject filter, desaturate foliage more
4dcaa32
style: 🎨 apply pre-commit.ci formatting
pre-commit-ci[bot] 029a2bf
Remove duplicated define
ThePagi bcb9594
Add missing var to serialization
ThePagi b9f0896
Add missing exception ref
ThePagi eba5976
Static cast instead of c-style
ThePagi c39c757
Remove useless try catch
ThePagi ea944a2
style: 🎨 apply pre-commit.ci formatting
pre-commit-ci[bot] 49546f0
add missing parentheses, nicer alt texture branching
6e4af2e
fix hlsl warnings
c5db831
better path handling, get cell id instead of translated name
f53d241
tiny fallback snow textures, better skylighting cover
7a0bf90
alphabetically sorted features (in code only) for your enjoyment
6bb54a2
better skylighting cover
6aa67e0
NoSnow Extra flag from 6 to 5
a990816
sort features in globals for consistency
2c6d127
move calculations to cpu, add constants for magic numbers
abfe08c
Merge remote-tracking branch 'origin/dev' into snow1
a8eb39e
style: 🎨 apply pre-commit.ci formatting
pre-commit-ci[bot] 05f593a
fix merge
ac219b1
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
4e72bf9
another merge fix
d4e1b54
Merge branch 'dev' into snow2
bd4d3f0
fix black lod
417657d
Merge branch 'dev' into snow1
56ddd84
fix global name change
62db6fa
remove snow from havok objects
6ca58db
snow on havok
9f37ae2
style: 🎨 apply pre-commit.ci formatting
pre-commit-ci[bot] f1157fd
fixes for ai-found issues
4b84f13
Merge branch 'snow2' of https://github.com/ThePagi/skyrim-community-s…
68fd9d9
Remove obsolete comment
ThePagi 0efdc3a
improve trees and lod trees, improve ao
3385c20
fix clamp function call, style issues, move hsv to Color
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [Info] | ||
| Version = 1-0-0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "AffectGrassTint": 1, | ||
| "AffectTreeTint": 0, | ||
| "AltSpec": 0.019999999552965164, | ||
| "AltTexture": "textures/pbr/landscape/frozenmarshice01", | ||
| "AltTint": [1.0, 1.0, 1.0, 0.6078431606292725], | ||
| "DensityRandomization": 2.0, | ||
| "MapZscale": 75000, | ||
| "BlendSmoothness": 5000, | ||
| "MapMax": [253952.0, -176128.0], | ||
| "MapMin": [-233472.0, 208896.0], | ||
| "MapTexture": "Shaders\\SnowCover\\Skyrim", | ||
| "FoliageHeightOffset": -3000.0, | ||
| "LogMicrofacetDensity": 33.0, | ||
| "MainSpec": 0.019999999552965164, | ||
| "MainTexture": "textures/pbr/landscape/snow01", | ||
| "MainTint": [1.0, 0.996880292892456, 0.996880292892456, 1.0], | ||
| "MaxAngle": 0.8130000233650208, | ||
| "MaxSummerMonth": 6, | ||
| "MaxWinterMonth": 0, | ||
| "MeltingSpeed": 1.0, | ||
| "MicrofacetRoughness": 0.15000000596046448, | ||
| "MinAngle": 0.22300000488758087, | ||
| "PeakAltAngle": 1.0, | ||
| "PeakMainAngle": 0.734000027179718, | ||
| "ScreenSpaceScale": 1.2000000476837158, | ||
| "SnowingSpeed": 1.0, | ||
| "UVScale": 1.0, | ||
| "WinterHeightOffset": -20000.0, | ||
| "SummerHeightOffset": 20000.0 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "AffectGrassTint": 1, | ||
| "AffectTreeTint": 0, | ||
| "AltSpec": 0.019999999552965164, | ||
| "AltTexture": "textures/pbr/landscape/frozenmarshice01", | ||
| "AltTint": [1.0, 1.0, 1.0, 0.6078431606292725], | ||
| "DensityRandomization": 2.0, | ||
| "MapZscale": 75000, | ||
| "BlendSmoothness": 5000, | ||
| "MapMax": [253952.0, -176128.0], | ||
| "MapMin": [-233472.0, 208896.0], | ||
| "MapTexture": "Shaders\\SnowCover\\Skyrim", | ||
| "FoliageHeightOffset": -3000.0, | ||
| "LogMicrofacetDensity": 33.0, | ||
| "MainSpec": 0.019999999552965164, | ||
| "MainTexture": "textures/pbr/landscape/snow01", | ||
| "MainTint": [1.0, 0.996880292892456, 0.996880292892456, 1.0], | ||
| "MaxAngle": 0.8130000233650208, | ||
| "MaxSummerMonth": 6, | ||
| "MaxWinterMonth": 0, | ||
| "MeltingSpeed": 1.0, | ||
| "MicrofacetRoughness": 0.15000000596046448, | ||
| "MinAngle": 0.22300000488758087, | ||
| "PeakAltAngle": 1.0, | ||
| "PeakMainAngle": 0.734000027179718, | ||
| "ScreenSpaceScale": 1.2000000476837158, | ||
| "SnowingSpeed": 1.0, | ||
| "UVScale": 1.0, | ||
| "WinterHeightOffset": -20000.0, | ||
| "SummerHeightOffset": 20000.0 | ||
| } |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,209 @@ | ||
| #include "Common/Color.hlsli" | ||
| #include "Common/SharedData.hlsli" | ||
| #include "Common/Random.hlsli" | ||
| #if defined(PSHADER) | ||
|
|
||
| namespace SnowCover | ||
| { | ||
|
|
||
| Texture2D<float4> SnowAlbedo : register(t38); | ||
| Texture2D<float3> SnowNormal : register(t39); | ||
| Texture2D<float4> SnowRmaos : register(t40); | ||
| Texture2D<float4> IceAlbedo : register(t41); | ||
| Texture2D<float3> IceNormal : register(t42); | ||
| Texture2D<float4> IceRmaos : register(t43); | ||
| Texture2D<float> SnowMap : register(t44); | ||
|
|
||
| // https://blog.selfshadow.com/publications/blending-in-detail/ | ||
| // for when s = (0,0,1) | ||
| float3 MyReorientNormal(float3 n1, float3 n2) | ||
| { | ||
| n1 += float3(0, 0, 1); | ||
| n2 *= float3(-1, -1, 1); | ||
|
|
||
| return n1 * dot(n1, n2) / n1.z - n2; | ||
| } | ||
|
|
||
| // http://chilliant.blogspot.com/2010/11/rgbhsv-in-hlsl.html | ||
| float3 Hue(float H) | ||
| { | ||
| float R = abs(H * 6 - 3) - 1; | ||
| float G = 2 - abs(H * 6 - 2); | ||
| float B = 2 - abs(H * 6 - 4); | ||
| return saturate(float3(R, G, B)); | ||
| } | ||
|
|
||
| float3 HSVtoRGB(in float3 HSV) | ||
ThePagi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| return ((Hue(HSV.x) - 1) * HSV.y + 1) * HSV.z; | ||
| } | ||
|
|
||
| float3 RGBtoHSV(in float3 RGB) | ||
| { | ||
| float3 HSV = 0; | ||
| HSV.z = max(RGB.r, max(RGB.g, RGB.b)); | ||
| float M = min(RGB.r, min(RGB.g, RGB.b)); | ||
| float C = HSV.z - M; | ||
|
|
||
| if (C != 0) { | ||
| HSV.y = C / HSV.z; | ||
| float3 Delta = (HSV.z - RGB) / C; | ||
| Delta.rgb -= Delta.brg; | ||
| Delta.rg += float2(2, 4); | ||
| if (RGB.r >= HSV.z) | ||
| HSV.x = Delta.b; | ||
| else if (RGB.g >= HSV.z) | ||
| HSV.x = Delta.r; | ||
| else | ||
| HSV.x = Delta.g; | ||
| HSV.x = frac(HSV.x / 6); | ||
| } | ||
| return HSV; | ||
| } | ||
|
|
||
| float GetHeightMult(float3 p) | ||
| { | ||
| float2 scale = SharedData::snowCoverSettings.mapScale; | ||
| float2 offset = SharedData::snowCoverSettings.mapOffset; | ||
| float2 uv = p.xy*scale + offset; | ||
| float height_tresh = p.z - SharedData::snowCoverSettings.SnowHeightOffset + (SnowMap.SampleLevel(SampColorSampler, uv, 0) - 0.5)*SharedData::snowCoverSettings.mapZscale; | ||
| return height_tresh; | ||
| } | ||
|
|
||
| float GetEnvironmentalMultiplier(float3 p) | ||
| { | ||
| return (GetHeightMult(p) + SharedData::snowCoverSettings.SeasonalAltitude) / SharedData::snowCoverSettings.BlendSmoothness; | ||
| } | ||
|
|
||
| void ApplyFoliageColor(inout float3 color, float env_mult) | ||
| { | ||
| float gmult = saturate(env_mult - SharedData::snowCoverSettings.FoliageHeightOffset / 5000); | ||
| float3 hsv = RGBtoHSV(color); | ||
| if (hsv.x > 0.55) | ||
| hsv.x = frac(lerp(hsv.x, 1.1, gmult) * 2); | ||
| else | ||
| hsv.x = lerp(hsv.x, 0.1, gmult); | ||
| hsv.y *= lerp(1, 0.25, 4.0 * gmult * (1.0 - gmult)); | ||
| color = HSVtoRGB(hsv); | ||
| } | ||
|
|
||
| void ApplySnowFoliage(inout float3 color, float3 worldNormal, float3 p, float skylight, float viewDist) | ||
| { | ||
| float env_mult = GetEnvironmentalMultiplier(p); | ||
| float distMult = 1 - smoothstep(10000, 30000, viewDist); | ||
| float weatherMult = distMult * SharedData::snowCoverSettings.TimeSnowing * max(500, SharedData::snowCoverSettings.SnowingDensity) / 500; | ||
| float mult = SharedData::snowCoverSettings.MainTint.a * saturate(env_mult); | ||
| mult = skylight * saturate(mult + weatherMult) * smoothstep(SharedData::snowCoverSettings.minAngle, SharedData::snowCoverSettings.maxAngle, worldNormal.z); | ||
| # if defined(GRASS) | ||
| if (SharedData::snowCoverSettings.AffectGrassTint) { | ||
| # else | ||
| if (SharedData::snowCoverSettings.AffectTreeTint) { | ||
| # endif | ||
| ApplyFoliageColor(color, env_mult); | ||
| } | ||
| if (mult < 0.01) | ||
| return; | ||
| float2 uv = frac(SharedData::snowCoverSettings.UVScale * (p.xy + worldNormal.xy) / 100); | ||
| float3 diffuse = Color::TrueLinearToGamma(SnowAlbedo.Sample(SampColorSampler, uv).rgb) * SharedData::snowCoverSettings.MainTint.rgb * Color::PBRLightingScale; | ||
|
|
||
| color = lerp(color, diffuse, mult); | ||
| } | ||
|
|
||
| # if !defined(BASIC_SNOW_COVER) | ||
| float ApplySnowBase(float3 worldNormal, inout float2 uv, out bool alt, float disp, float3 p, float skylight, float waterDist, float viewDist) | ||
| { | ||
| // the range in which water level affects snow | ||
| waterDist = smoothstep(-64, 8, -waterDist - disp); | ||
| // distance from the camera in which weather has effect, this extends far beyond where lod starts | ||
| float distMult = 1 - smoothstep(20000, 40000 + 1000 * sin(p.z * 0.001 + cos(p.x * p.y * 0.001)), viewDist); | ||
| // the amount of snow based on weather, TimeSnowing transitions smoothly between -1 in rain and 1 when snowing | ||
| float weatherMult = distMult * pow(SharedData::snowCoverSettings.TimeSnowing, 3) * max(500, SharedData::snowCoverSettings.SnowingDensity) / 500; | ||
| weatherMult = clamp(-1, 1, (weatherMult + disp * 0.1) * max(SharedData::snowCoverSettings.minAngle, worldNormal.z)); | ||
| // the amount of snow based on season and weather | ||
| float env_mult = saturate(max(saturate(GetEnvironmentalMultiplier(p) + disp), weatherMult)) - waterDist; | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| #if defined(LODOBJECTSHD) || defined(LODOBJECTS) | ||
|
|
||
| #endif | ||
| float mult = skylight * env_mult * smoothstep(SharedData::snowCoverSettings.minAngle, SharedData::snowCoverSettings.maxAngle, worldNormal.z); | ||
| if (mult < 0.001){ | ||
| alt = false; | ||
| return 0; | ||
| } | ||
| float main_mult = (1 - abs(worldNormal.z - SharedData::snowCoverSettings.peakMainAngle)) + min(0, weatherMult) * SharedData::snowCoverSettings.minAngle; | ||
| float alt_mult = (1 - abs(worldNormal.z - SharedData::snowCoverSettings.peakAltAngle)) + sin(p.z * 0.01 + cos(p.x * p.y * 0.01) * 0.025) * 0.05; | ||
| alt = alt_mult > main_mult; | ||
| // apparently LOD landscape color sampler clamps uvs | ||
| uv = frac(SharedData::snowCoverSettings.UVScale * (p.xy / 100 + worldNormal.xy * disp)); | ||
| return mult; | ||
| } | ||
|
|
||
| # if defined(TRUE_PBR) | ||
| PBR::SurfaceProperties ApplySnowPBR(inout float3 diffuse, inout float3 worldNormal, out float mult, float disp, float3 p, float skylight, float waterDist, float viewDist, PBR::SurfaceProperties prop, float2 uv) | ||
| { | ||
| bool alt; | ||
| mult = ApplySnowBase(worldNormal, uv, alt, disp, p, skylight, waterDist, viewDist); | ||
| if (mult <= 0.0) | ||
| return prop; | ||
| float4 rmaos; | ||
| if (alt){ | ||
| rmaos = IceRmaos.Sample(SampColorSampler, uv); | ||
| float3 albedo = IceAlbedo.Sample(SampColorSampler, uv).rgb; | ||
| albedo = Color::Diffuse(albedo) * SharedData::snowCoverSettings.AltTint.rgb; | ||
| diffuse = lerp(diffuse, albedo, mult * SharedData::snowCoverSettings.AltTint.w); | ||
| worldNormal = TransformNormal(IceNormal.Sample(SampNormalSampler, uv).rgb); | ||
| prop.F0 = lerp(prop.F0, rmaos.w *SharedData::snowCoverSettings.altSpec, mult); | ||
|
|
||
| } | ||
| else{ | ||
| rmaos = SnowRmaos.Sample(SampColorSampler, uv); | ||
| float3 albedo = SnowAlbedo.Sample(SampColorSampler, uv).rgb; | ||
| albedo = Color::Diffuse(albedo) * SharedData::snowCoverSettings.MainTint.rgb; | ||
| diffuse = lerp(diffuse, albedo, mult * SharedData::snowCoverSettings.MainTint.w); | ||
| worldNormal = TransformNormal(SnowNormal.Sample(SampNormalSampler, uv).rgb); | ||
| prop.F0 = lerp(prop.F0, rmaos.w * SharedData::snowCoverSettings.mainSpec, mult); | ||
|
|
||
| } | ||
| prop.Roughness = lerp(prop.Roughness, rmaos.x, mult); | ||
| prop.Metallic = lerp(prop.Metallic, rmaos.y, mult); | ||
| prop.AO = lerp(prop.AO, rmaos.z, mult); | ||
| prop.GlintScreenSpaceScale = lerp(prop.GlintScreenSpaceScale, SharedData::snowCoverSettings.Glint.x, mult); | ||
| prop.GlintLogMicrofacetDensity = lerp(prop.GlintLogMicrofacetDensity, SharedData::snowCoverSettings.Glint.y, mult); | ||
| prop.GlintMicrofacetRoughness = lerp(prop.GlintMicrofacetRoughness, SharedData::snowCoverSettings.Glint.z, mult); | ||
| prop.GlintDensityRandomization = lerp(prop.GlintDensityRandomization, SharedData::snowCoverSettings.Glint.w, mult); | ||
| return prop; | ||
| } | ||
| # else | ||
|
|
||
| float ApplySnow(inout float3 diffuse, inout float3 worldNormal, inout float glossiness, inout float shininess, float disp, float3 p, float skylight, float waterDist, float viewDist, float2 uv) | ||
| { | ||
| bool alt; | ||
| float mult = ApplySnowBase(worldNormal, uv, alt, disp, p, skylight, waterDist, viewDist); | ||
| if (mult <= 0.0) | ||
| return 0; | ||
| float4 rmaos; | ||
| if(alt){ | ||
| float3 albedo = IceAlbedo.Sample(SampColorSampler, uv).rgb; | ||
| albedo = Color::TrueLinearToGamma(albedo) * SharedData::snowCoverSettings.AltTint.rgb * Color::PBRLightingScale; | ||
| rmaos = IceRmaos.Sample(SampColorSampler, uv); | ||
| shininess = lerp(shininess, 25 * 500 * SharedData::snowCoverSettings.altSpec * rmaos.w, mult); | ||
| worldNormal = TransformNormal(IceNormal.Sample(SampNormalSampler, uv).rgb); | ||
| diffuse = lerp(diffuse, rmaos.z * albedo, mult * SharedData::snowCoverSettings.AltTint.w); | ||
|
|
||
| } | ||
| else{ | ||
| float3 albedo = SnowAlbedo.Sample(SampColorSampler, uv).rgb; | ||
| albedo = Color::TrueLinearToGamma(albedo) * SharedData::snowCoverSettings.MainTint.rgb * Color::PBRLightingScale; | ||
| rmaos = SnowRmaos.Sample(SampColorSampler, uv); | ||
| shininess = lerp(shininess, 25 * 500 * SharedData::snowCoverSettings.mainSpec * rmaos.w, mult); | ||
| worldNormal = TransformNormal(SnowNormal.Sample(SampNormalSampler, uv).rgb); | ||
| diffuse = lerp(diffuse, rmaos.z * albedo, mult * SharedData::snowCoverSettings.MainTint.w); | ||
|
|
||
| } | ||
| glossiness = lerp(glossiness, 1 - rmaos.x, mult); | ||
| return mult; | ||
| } | ||
| # endif | ||
| # endif | ||
|
|
||
| } | ||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "AffectGrassTint": 1, | ||
| "AffectTreeTint": 0, | ||
| "AltSpec": 0.019999999552965164, | ||
| "AltTexture": "textures/pbr/landscape/frozenmarshice01", | ||
| "AltTint": [1.0, 1.0, 1.0, 0.4117647111415863], | ||
| "DensityRandomization": 2.0, | ||
| "MapZscale": 75000, | ||
| "BlendSmoothness": 5000, | ||
| "MapMax": [253952.0, -176128.0], | ||
| "MapMin": [-233472.0, 208896.0], | ||
| "MapTexture": "Shaders\\SnowCover\\Skyrim", | ||
| "FoliageHeightOffset": -3000.0, | ||
| "LogMicrofacetDensity": 33.0, | ||
| "MainSpec": 0.019999999552965164, | ||
| "MainTexture": "textures/pbr/landscape/snow01", | ||
| "MainTint": [1.0, 1.0, 1.0, 1.0], | ||
| "MaxAngle": 0.8130000233650208, | ||
| "MaxSummerMonth": 6, | ||
| "MaxWinterMonth": 0, | ||
| "MeltingSpeed": 1.0, | ||
| "MicrofacetRoughness": 0.15000000596046448, | ||
| "MinAngle": 0.2750000059604645, | ||
| "PeakAltAngle": 1.2000000476837158, | ||
| "PeakMainAngle": 0.753000020980835, | ||
| "ScreenSpaceScale": 1.2000000476837158, | ||
| "SnowingSpeed": 1.0, | ||
| "UVScale": 1.0, | ||
| "WinterHeightOffset": -20000.0, | ||
| "SummerHeightOffset": 20000.0 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "AffectGrassTint": 1, | ||
| "AffectTreeTint": 0, | ||
| "AltSpec": 0.019999999552965164, | ||
| "AltTexture": "textures/pbr/landscape/frozenmarshice01", | ||
| "AltTint": [1.0, 0.9921568632125854, 1.0, 0.4470588266849518], | ||
| "BlendSmoothness": 5000.0, | ||
| "DensityRandomization": 2.700000047683716, | ||
| "FoliageHeightOffset": -4000.0, | ||
| "LogMicrofacetDensity": 4.627999782562256, | ||
| "MainSpec": 0.019999999552965164, | ||
| "MainTexture": "textures/pbr/landscape/snow01", | ||
| "MainTint": [1.0, 1.0, 1.0, 1.0], | ||
| "MapMax": [253952.0, -176128.0], | ||
| "MapMin": [-233472.0, 208896.0], | ||
| "MapTexture": "Shaders\\SnowCover\\Skyrim", | ||
| "MapZscale": 75000.0, | ||
| "MaxAngle": 0.7319999933242798, | ||
| "MaxSummerMonth": 6, | ||
| "MaxWinterMonth": 0, | ||
| "MeltingSpeed": 1.0, | ||
| "MicrofacetRoughness": 0.8130000233650208, | ||
| "MinAngle": 0.296999990940094, | ||
| "PeakAltAngle": 0.45399999618530273, | ||
| "PeakMainAngle": 0.9300000071525574, | ||
| "ScreenSpaceScale": 1.2400000095367432, | ||
| "SnowingSpeed": 1.0, | ||
| "UVScale": 0.5, | ||
| "WinterHeightOffset": -20000.0, | ||
| "SummerHeightOffset": 20000.0 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "AffectGrassTint": 1, | ||
| "AffectTreeTint": 0, | ||
| "AltSpec": 0.019999999552965164, | ||
| "AltTexture": "textures/pbr/landscape/frozenmarshice01", | ||
| "AltTint": [1.0, 1.0, 1.0, 0.6078431606292725], | ||
| "DensityRandomization": 2.0, | ||
| "MapZscale": 75000, | ||
| "BlendSmoothness": 5000, | ||
| "MapMax": [253952.0, -176128.0], | ||
| "MapMin": [-233472.0, 208896.0], | ||
| "MapTexture": "Shaders\\SnowCover\\Skyrim", | ||
| "FoliageHeightOffset": -3000.0, | ||
| "LogMicrofacetDensity": 33.0, | ||
| "MainSpec": 0.019999999552965164, | ||
| "MainTexture": "textures/pbr/landscape/snow01", | ||
| "MainTint": [1.0, 0.996880292892456, 0.996880292892456, 1.0], | ||
| "MaxAngle": 0.8130000233650208, | ||
| "MaxSummerMonth": 6, | ||
| "MaxWinterMonth": 0, | ||
| "MeltingSpeed": 1.0, | ||
| "MicrofacetRoughness": 0.15000000596046448, | ||
| "MinAngle": 0.22300000488758087, | ||
| "PeakAltAngle": 1.0, | ||
| "PeakMainAngle": 0.734000027179718, | ||
| "ScreenSpaceScale": 1.2000000476837158, | ||
| "SnowingSpeed": 1.0, | ||
| "UVScale": 1.0, | ||
| "WinterHeightOffset": -20000.0, | ||
| "SummerHeightOffset": 20000.0 | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the source of this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made by me with https://en.uesp.net/wiki/File:SR-map-Roadmap.png#filelinks (public domain)