fix issues on AMD, temporary ambient sss brightness slider

This commit is contained in:
Xonk
2023-06-05 23:34:26 -04:00
parent ab35096ee6
commit 9448fb105a
9 changed files with 43 additions and 38 deletions

View File

@ -126,6 +126,7 @@
#define SSS_TYPE 1 // [0 1 2 3]
#define Ambient_SSS // subsurface scattering from the sky's light. If SSAO is enabled, this costs very little performance.
#define ambientsss_brightness 1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 ]
#define LabSSS_Curve 1.0 // i just really like how it looks at 2.0, so i made it an option. [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 ]
#define Strong_SSS_strength 45 // [ 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 2 3 4 5 6 7 8 9 10 15 20 30 35 40 45 50]
#define Medium_SSS_strength 30 // [ 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 2 3 4 5 6 7 8 9 10 15 20 30 35 40 45 50]

View File

@ -202,8 +202,8 @@ void MaterialReflections(
){
vec3 Reflections_Final = Output;
vec3 SkyReflection = Output;
vec3 SunReflection;
vec4 Reflections;
vec3 SunReflection = vec3(0.0);
vec4 Reflections = vec4(0.0);
float reflectLength;
float Outdoors = clamp((lightmap-0.6)*5.0, 0.0,1.0);
@ -250,7 +250,7 @@ void MaterialReflections(
//
if (hasReflections) { // Skip sky reflection and SSR if its just not very visible anyway
#ifdef Sky_reflection
SkyReflection = skyCloudsFromTex(L, colortex4).rgb / 150. * 5.;
SkyReflection = ( skyCloudsFromTex(L, colortex4).rgb / 150. ) * 5.;
#endif
#ifdef Screen_Space_Reflections

View File

@ -345,7 +345,7 @@ vec4 renderClouds(
float GetCloudShadow(vec3 eyePlayerPos){
vec3 playerPos = eyePlayerPos + cameraPosition;
playerPos.y += 0.05;
float shadow;
float shadow = 0.0;
// assume a flat layer of cloud, and stretch the sampled density along the sunvector, starting from some vertical layer in the cloud.
#ifdef Cumulus
@ -365,7 +365,7 @@ float GetCloudShadow(vec3 eyePlayerPos){
}
float GetCloudShadow_VLFOG(vec3 WorldPos){
float shadow;
float shadow = 0.0;
// assume a flat layer of cloud, and stretch the sampled density along the sunvector, starting from some vertical layer in the cloud.
#ifdef Cumulus
@ -391,7 +391,9 @@ float GetAltoOcclusion(vec3 eyePlayerPos){
vec3 playerPos = eyePlayerPos + cameraPosition;
playerPos.y += 0.05;
float shadow;
float shadow = 0.0;
vec3 lowShadowStart = playerPos + normalize(vec3(0,1,0)) * max((MaxCumulusHeight - 70) - playerPos.y,0.0) ;
shadow = GetCumulusDensity(lowShadowStart,0) * cloudDensity;