Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
511068c
fix: Update README.md with troubleshooting steps for Build with Docke…
jkyuusai Jan 29, 2025
2e71c67
chore: improved complex material performance slightly (#922)
doodlum Jan 29, 2025
ab6e973
chore: added more minor optimisations (#924)
doodlum Jan 29, 2025
6fd663d
feat: parallax warping fix (#920)
ThePagi Jan 29, 2025
db3b5be
feat: frame limiter for frame generation (#927)
doodlum Jan 30, 2025
613c5aa
chore: better skylighting quality (#928)
doodlum Jan 30, 2025
bb1835f
fix: feature inconsistencies (#929)
doodlum Feb 2, 2025
9c3b3d5
fix: consistent grass collision (#938)
doodlum Feb 2, 2025
b75cd3e
fix: grass consistency when using mods (#939)
doodlum Feb 2, 2025
a7f22c4
fix: black screen when not using DLSSG
doodlum Feb 2, 2025
892fdb6
Merge branch 'dev' of https://github.com/doodlum/skyrim-community-sha…
doodlum Feb 3, 2025
decde11
chore: bump versions
doodlum Feb 3, 2025
d9a4283
chore: reduce effect shadow radius
doodlum Feb 3, 2025
cb1ffd5
chore: minor tweaks to features (#942)
doodlum Feb 3, 2025
89bbbcd
fix: renderpass crash when exceeds 64k (#941)
doodlum Feb 3, 2025
7a809e9
fix: dynamic cubemap color (#943)
doodlum Feb 3, 2025
2680267
chore: finalize terrain blending (#948)
doodlum Feb 4, 2025
768a60f
fix: skylighting darkness on some foliage (#949)
doodlum Feb 4, 2025
d6897ed
refactor: change VariableCache data to global (#950)
doodlum Feb 4, 2025
97e15fb
chore: terrain blending tweaks
doodlum Feb 5, 2025
0b87c6c
feat: PBR in gamma space for consistency (#952)
ThePagi Feb 6, 2025
83d0628
fix: skylighting generation
doodlum Feb 6, 2025
46a1975
chore: gamma space features and fixes (#953)
doodlum Feb 6, 2025
245f0b6
fix: grass collisions not checking capsules (#955)
doodlum Feb 6, 2025
a7541b7
fix: do not patch VR renderpasses (#954)
doodlum Feb 6, 2025
8ff981d
fix: corrected VR hooks (#956)
doodlum Feb 6, 2025
1c48ca9
fix: fix parallax height blending, blurriness, MLP cutoff (#958)
ThePagi Feb 9, 2025
0ef68b6
fix: fix framecount not always iterating (#959)
doodlum Feb 11, 2025
4606ba9
chore: tweak features to improve pbr consistency (#961)
doodlum Feb 12, 2025
36995b4
perf: improve SSGI default settings
doodlum Feb 13, 2025
326f3de
perf(pbr): improve glints (#962)
doodlum Feb 16, 2025
f368e76
feat(cloud shadows): add opacity slider (#963)
doodlum Feb 16, 2025
cabefab
chore(wetness): make pbr consistent, reduce overall glossiness (#964)
ThePagi Feb 16, 2025
de45037
fix(pbr): fix mlp flicker and wrong coat color, convert additional co…
ThePagi Feb 16, 2025
a927f35
Update Lighting.hlsl (#968)
ThePagi Feb 16, 2025
c9bc669
chore(sss): increase human thickness
doodlum Feb 17, 2025
a8df07a
Merge branch 'dev' of https://github.com/doodlum/skyrim-community-sha…
doodlum Feb 17, 2025
209de26
feat: use half linear space (#970)
doodlum Feb 17, 2025
7cb273b
feat: added mipbias for TAA
doodlum Feb 17, 2025
cbf88d9
fix(pbr): more mlp refraction fixes (#972)
ThePagi Feb 17, 2025
8e01cf4
chore(ssgi): tweak default settings
doodlum Feb 17, 2025
9214298
fix: water compile error
doodlum Feb 17, 2025
b037b8f
feat(upscaling): nis sharpening (#973)
doodlum Feb 18, 2025
d64b72e
feat: improve subtle shading (#976)
doodlum Feb 27, 2025
55378f0
fix: fix minor skylighting issues (#977)
doodlum Feb 27, 2025
8760c42
fix: fix dlssg state on startup (#978)
doodlum Feb 27, 2025
5a88a3e
fix: fix envmap brightness (#979)
doodlum Feb 27, 2025
e6a6414
fix: skylighting compile error (#980)
doodlum Feb 27, 2025
51a4267
Merge branch 'dx12-swapchain' into dx12merge-1
doodlum Feb 28, 2025
9d52ad0
style: 🎨 apply clang-format changes
doodlum Feb 28, 2025
153ef40
fix: most merge errors
doodlum Feb 28, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
build/
bin/
dist/
.idea/
.vs*/
CMakeUserPresets.json
shadertoolsconfig.json
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.21)

project(
CommunityShaders
VERSION 1.1.15
VERSION 1.2.0
LANGUAGES CXX
)

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ docker run -it --rm -v .:C:/skyrim-community-shaders skyrim-community-shaders:la
4. Retrieve the generated build files from the `build/aio` folder.
5. In subsequent builds only run the build step (3.)

#### Troubleshooting Build with Docker
If you run into `Access violation` build errors during step 3, you can try adding [`--isolation=process`](https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container):
```pwsh
docker run -it --rm --isolation=process -v .:C:/skyrim-community-shaders skyrim-community-shaders:latest
```

## License

### Default
Expand Down
1 change: 0 additions & 1 deletion cmake/XSEPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio")
/Zc:trigraphs
/Zc:wchar_t
/wd4200 # nonstandard extension used : zero-sized array in struct/union
# /arch:AVX
)

target_compile_options(${PROJECT_NAME} PUBLIC "$<$<CONFIG:DEBUG>:${SC_DEBUG_OPTS}>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ namespace CloudShadows
{
float3 cloudSampleDir = GetCloudShadowSampleDir(worldPosition, SharedData::DirLightDirection.xyz).xyz;
float cloudCubeSample = CloudShadowsTexture.SampleLevel(textureSampler, cloudSampleDir, 0).x;
return 1.0 - saturate(cloudCubeSample);
return lerp(1.0, 1.0 - cloudCubeSample, SharedData::cloudShadowsSettings.Opacity);
}
}
2 changes: 1 addition & 1 deletion features/Cloud Shadows/Shaders/Features/CloudShadows.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Info]
Version = 1-1-1
Version = 1-2-0
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

#if defined(SKYLIGHTING)
# include "Skylighting/Skylighting.hlsli"
#endif

namespace DynamicCubemaps
{
TextureCube<float4> EnvReflectionsTexture : register(t30);
Expand All @@ -16,24 +21,65 @@ namespace DynamicCubemaps

#if !defined(WATER)

float3 GetDynamicCubemapSpecularIrradiance(float2 uv, float3 N, float3 VN, float3 V, float roughness, float distance)
# if defined(SKYLIGHTING)
float3 GetDynamicCubemapSpecularIrradiance(float2 uv, float3 N, float3 VN, float3 V, float roughness, sh2 skylighting)
# else
float3 GetDynamicCubemapSpecularIrradiance(float2 uv, float3 N, float3 VN, float3 V, float roughness)
# endif
{
float3 R = reflect(-V, N);
float NoV = saturate(dot(N, V));

float level = roughness * 7.0;

// Horizon specular occlusion
// https://marmosetco.tumblr.com/post/81245981087
float horizon = min(1.0 + dot(R, VN), 1.0);
horizon *= horizon * horizon;

float3 specularIrradiance = EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level).xyz;
specularIrradiance = Color::GammaToLinear(specularIrradiance);
specularIrradiance *= horizon;
# if defined(DEFERRED)
return horizon;
# else

float3 finalIrradiance = 0;

# if defined(SKYLIGHTING)
if (SharedData::InInterior) {
float3 specularIrradiance = Color::GammaToLinear(EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level));

return finalIrradiance;
}

sh2 specularLobe = SphericalHarmonics::FauxSpecularLobe(N, -V, roughness);

float skylightingSpecular = SphericalHarmonics::FuncProductIntegral(skylighting, specularLobe);
skylightingSpecular = Skylighting::mixSpecular(SharedData::skylightingSettings, skylightingSpecular);

float3 specularIrradiance = 1;

if (skylightingSpecular < 1.0)
specularIrradiance = Color::GammaToLinear(EnvTexture.SampleLevel(SampColorSampler, R, level));

float3 specularIrradianceReflections = 1.0;

return specularIrradiance;
if (skylightingSpecular > 0.0)
specularIrradianceReflections = Color::GammaToLinear(EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level));

finalIrradiance = lerp(specularIrradiance, specularIrradianceReflections, skylightingSpecular);
# else
float3 specularIrradiance = Color::GammaToLinear(EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level));

finalIrradiance += specularIrradiance;
# endif
return finalIrradiance;
# endif
}

float3 GetDynamicCubemap(float2 uv, float3 N, float3 VN, float3 V, float roughness, float3 F0, float3 diffuseColor, float distance)
# if defined(SKYLIGHTING)
float3 GetDynamicCubemap(float3 N, float3 VN, float3 V, float roughness, float3 F0, sh2 skylighting)
# else
float3 GetDynamicCubemap(float3 N, float3 VN, float3 V, float roughness, float3 F0)
# endif
{
float3 R = reflect(-V, N);
float NoV = saturate(dot(N, V));
Expand All @@ -48,12 +94,42 @@ namespace DynamicCubemaps
horizon *= horizon * horizon;

# if defined(DEFERRED)
return horizon * (1 + F0 * (1 / (specularBRDF.x + specularBRDF.y) - 1));
return horizon * (F0 * specularBRDF.x + specularBRDF.y);
# else
float3 specularIrradiance = EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level).xyz;
specularIrradiance = Color::GammaToLinear(specularIrradiance);

return specularIrradiance * (1 + F0 * (1 / (specularBRDF.x + specularBRDF.y) - 1));
float3 finalIrradiance = 0;

# if defined(SKYLIGHTING)
if (SharedData::InInterior) {
float3 specularIrradiance = Color::GammaToLinear(EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level));

finalIrradiance += specularIrradiance;

return horizon * (F0 * specularBRDF.x + specularBRDF.y) * finalIrradiance;
}

sh2 specularLobe = SphericalHarmonics::FauxSpecularLobe(N, -V, roughness);

float skylightingSpecular = SphericalHarmonics::FuncProductIntegral(skylighting, specularLobe);
skylightingSpecular = Skylighting::mixSpecular(SharedData::skylightingSettings, skylightingSpecular);

float3 specularIrradiance = 1;

if (skylightingSpecular < 1.0)
specularIrradiance = Color::GammaToLinear(EnvTexture.SampleLevel(SampColorSampler, R, level));

float3 specularIrradianceReflections = 1.0;

if (skylightingSpecular > 0.0)
specularIrradianceReflections = Color::GammaToLinear(EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level));

finalIrradiance = lerp(specularIrradiance, specularIrradianceReflections, skylightingSpecular);
# else
float3 specularIrradiance = Color::GammaToLinear(EnvReflectionsTexture.SampleLevel(SampColorSampler, R, level));

finalIrradiance += specularIrradiance;
# endif
return horizon * (F0 * specularBRDF.x + specularBRDF.y) * finalIrradiance;
# endif
}
#endif // !WATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,16 @@ float smoothbumpstep(float edge0, float edge1, float x)

float4 color = DynamicCubemapRaw[ThreadID];

float distanceFactor = sqrt(smoothbumpstep(0.0, 2.0, length(position.xyz)));
float distance = length(position.xyz);
float distanceFactor = smoothbumpstep(0.0, 2.0, distance);

if (distance < 1.0)
distanceFactor = sqrt(distanceFactor);

#if defined(FAKEREFLECTIONS)
distanceFactor = max(distanceFactor, smoothstep(0.0, 2.0, distance));
#endif

color *= distanceFactor;

DynamicCubemap[ThreadID] = max(0, color);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Info]
Version = 2-0-0
Version = 2-1-0
Loading