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

@ -216,7 +216,7 @@ void main() {
#ifdef Variable_Penumbra_Shadows
if (NdotL > 0.0 || LabSSS >= 0.0) {
if (NdotL > 0.0 || LabSSS > 0.0) {
vec3 p3 = mat3(gbufferModelViewInverse) * fragpos + gbufferModelViewInverse[3].xyz;

View File

@ -546,7 +546,7 @@ void rtAO(inout vec3 lighting, vec3 normal, vec2 noise, vec3 fragpos, float ligh
}
// occlude = mix( occlude,1, inShadow);
// occlude = occlude*0.5 + 0.5;
lighting *= 2.5;
lighting *= 3.0;
lighting *= mix(occlude/nrays,1.0,0) ;
}
@ -644,8 +644,11 @@ vec3 SubsurfaceScattering_sky(vec3 albedo, float Scattering, float Density){
vec3 absorbed = max(luma(albedo) - albedo,0.0);
// vec3 scatter = exp(-sqrt(max(Scattering+0.05,0.0) * absorbed * 25)) * exp(Scattering * -5);
vec3 scatter = exp(-sqrt(Scattering * absorbed * 5)) * pow((-Scattering+1.0)*1.5,2.0);
vec3 scatter = exp(-sqrt(Scattering * absorbed * 5)) * pow((-Scattering+1.0)*1.25,2.0);
scatter *= pow(Density,LabSSS_Curve);
// temporary
scatter *= ambientsss_brightness;
return scatter;
}
@ -880,10 +883,9 @@ void main() {
if (abs(filtered.y-0.1) < 0.0004 && !iswater) Shadows = clamp((lightmap.y-0.85)*25,0,1);
float SHADOWBLOCKERDEPTBH = filtered.y;
if (abs(filtered.y-0.1) < 0.0004 && !iswater) SHADOWBLOCKERDEPTBH = 1.0-clamp((lightmap.y-0.85)*25,0,1);
//if (abs(filtered.y-0.1) < 0.0004 && !iswater) SHADOWBLOCKERDEPTBH = 1.0-clamp((lightmap.y-0.85)*25,0,1);
vec3 SSS = vec3(0.0);
float SSS_strength;
if (NdotL > 0.001) {

View File

@ -320,9 +320,9 @@ if (gl_FragCoord.x * texelSize.x < RENDER_SCALE.x && gl_FragCoord.y * texelSize
if (iswater > 0.95){
if(physics_iterationsNormal < 1.0){
//if(physics_iterationsNormal < 1.0){
float bumpmult = 1.;
vec3 bump;
vec3 bump = vec3(0);
vec3 posxz = p3+cameraPosition;
posxz.xz -= posxz.y;
@ -335,26 +335,26 @@ if (gl_FragCoord.x * texelSize.x < RENDER_SCALE.x && gl_FragCoord.y * texelSize
bump = bump * vec3(bumpmult, bumpmult, bumpmult) + vec3(0.0f, 0.0f, 1.0f - bumpmult);
normal = normalize(bump * tbnMatrix);
}else{
/// ------ PHYSICS MOD OCEAN SHIT ------ ///
WavePixelData wave = physics_wavePixel(physics_localPosition.xz, physics_localWaviness, physics_iterationsNormal, physics_gameTime);
// float Foam = wave.foam;
// Albedo = mix(Albedo,vec3(1),Foam);
// gl_FragData[0].a = Foam;
normal = normalize(worldToView(wave.normal) + mix(normal, vec3(0.0), clamp(physics_localWaviness,0.0,1.0)));
vec3 worldSpaceNormal = normal;
vec3 bitangent = normalize(cross(tangent.xyz, worldSpaceNormal));
mat3 tbn_new = mat3(tangent.xyz, binormal, worldSpaceNormal);
vec3 tangentSpaceNormal = worldSpaceNormal * tbn_new;
TangentNormal = tangentSpaceNormal.xy * 0.5 + 0.5;
}
//}else{
// /// ------ PHYSICS MOD OCEAN SHIT ------ ///
//
// WavePixelData wave = physics_wavePixel(physics_localPosition.xz, physics_localWaviness, physics_iterationsNormal, physics_gameTime);
// // float Foam = wave.foam;
//
// // Albedo = mix(Albedo,vec3(1),Foam);
// // gl_FragData[0].a = Foam;
//
//
// normal = normalize(worldToView(wave.normal) + mix(normal, vec3(0.0), clamp(physics_localWaviness,0.0,1.0)));
//
// vec3 worldSpaceNormal = normal;
//
// vec3 bitangent = normalize(cross(tangent.xyz, worldSpaceNormal));
// mat3 tbn_new = mat3(tangent.xyz, binormal, worldSpaceNormal);
// vec3 tangentSpaceNormal = worldSpaceNormal * tbn_new;
//
// TangentNormal = tangentSpaceNormal.xy * 0.5 + 0.5;
//}
}
// cannot encode alpha or it will shit its pants

View File

@ -1,4 +1,4 @@
#version 120
// #define WORLD
#define WORLD
#include "gbuffers_all_translucent.fsh"

View File

@ -1,4 +1,4 @@
#version 120
// #define WORLD
#define WORLD
#include "gbuffers_all_translucent.vsh"

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;

View File

@ -43,7 +43,7 @@ alphaTest.gbuffers_skytextured=false
alphaTest.gbuffers_hand=true
sliders = SSS_TYPE Cloud_Speed Cumulus_height Cumulus_coverage Cumulus_density Alto_coverage Alto_density ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog NetherFog_brightness WeatherDay Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength Cloud_Height Dynamic_sky_day ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B cloud_speed Rain_coverage override_R override_G override_B override_Cloudy_Fog_Density override_cloudyfog_fade override_fog override_Uniform_Fog_Density override_uniformfog_fade override_Bloomy_Fog override_Sun_Strength Moon_temp Haze_amount UniformFog_amount CloudyFog_amount TimeOfDayFog_multiplier RainFog_amount CaveFog_amount uniformfog_fade cloudyfog_fade cloudray_amount Swamp_cloudyfog_height Jungle_cloudyfog_fade Swamp_uniformfog_height Jungle_uniformfog_fade noise_mode Distant_shadow_quality ambient_temp Sun_temp Puddle_Size Cloud_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength Swamp_Sun_Strength Jungle_Sun_Strength Swamp_Bloomy_Fog Jungle_Bloomy_Fog Swamp_Mie Jungle_Mie Swamp_cloudyfog_Density Jungle_Cloudy_Fog_Density Swamp_UniformFog_Density Jungle_Uniform_Fog_Density Swamp_Bloomy_Fog Jungle_Bloomy_Fog Swamp_Mie Jungle_Mie Swamp_R Swamp_G Swamp_B Jungle_R Jungle_G Jungle_B Jungle_fog_strength Swamp_fog_strength Lush_fog_strength Snells_Window_Width self_shadow_samples Shadow_brightness Cloud_top_cutoff Cloud_base_cutoff Cloud_fade_amount BLOOMY_FOG FOG_RAIN_MULTIPLIER FOG_TOD_MULTIPLIER CLOUDY_FOG_AMOUNT BASE_FOG_AMOUNT WAVY_SPEED WAVY_STRENGTH ANTI_GHOSTING BLOOM_STRENGTH shadowDistance shadowDistanceRenderMul FinalR FinalG FinalB Ambient_Mult Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation SKY_BRIGHTNESS_DAY SKY_BRIGHTNESS_NIGHT BLEND_FACTOR FLICKER_REDUCTION MOTION_REJECTION VL_SAMPLES Exposure_Speed POM_MAP_RES POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL ATMOSPHERIC_DENSITY CLOUDS_SHADOWS_STRENGTH moon_illuminance moonColorR moonColorG moonColorB fog_mieg1 fog_mieg2 fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius SSAO_SAMPLES Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Mie_Phase Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK RENDER_SCALE_X RENDER_SCALE_Y VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ cloudDensity cloudCoverage fbmAmount fbmPower1 fbmPower2 cloudMieG cloudMieG2 cloudMie2Multiplier Strong_SSS_strength Medium_SSS_strength Weak_SSS_strength Shadow_brightness Roughness_Threshold Sun_specular_Strength reflection_quality Roughness_Strength SSS_mode DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS
sliders =ambientsss_brightness SSS_TYPE Cloud_Speed Cumulus_height Cumulus_coverage Cumulus_density Alto_coverage Alto_density ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog NetherFog_brightness WeatherDay Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength Cloud_Height Dynamic_sky_day ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B cloud_speed Rain_coverage override_R override_G override_B override_Cloudy_Fog_Density override_cloudyfog_fade override_fog override_Uniform_Fog_Density override_uniformfog_fade override_Bloomy_Fog override_Sun_Strength Moon_temp Haze_amount UniformFog_amount CloudyFog_amount TimeOfDayFog_multiplier RainFog_amount CaveFog_amount uniformfog_fade cloudyfog_fade cloudray_amount Swamp_cloudyfog_height Jungle_cloudyfog_fade Swamp_uniformfog_height Jungle_uniformfog_fade noise_mode Distant_shadow_quality ambient_temp Sun_temp Puddle_Size Cloud_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength Swamp_Sun_Strength Jungle_Sun_Strength Swamp_Bloomy_Fog Jungle_Bloomy_Fog Swamp_Mie Jungle_Mie Swamp_cloudyfog_Density Jungle_Cloudy_Fog_Density Swamp_UniformFog_Density Jungle_Uniform_Fog_Density Swamp_Bloomy_Fog Jungle_Bloomy_Fog Swamp_Mie Jungle_Mie Swamp_R Swamp_G Swamp_B Jungle_R Jungle_G Jungle_B Jungle_fog_strength Swamp_fog_strength Lush_fog_strength Snells_Window_Width self_shadow_samples Shadow_brightness Cloud_top_cutoff Cloud_base_cutoff Cloud_fade_amount BLOOMY_FOG FOG_RAIN_MULTIPLIER FOG_TOD_MULTIPLIER CLOUDY_FOG_AMOUNT BASE_FOG_AMOUNT WAVY_SPEED WAVY_STRENGTH ANTI_GHOSTING BLOOM_STRENGTH shadowDistance shadowDistanceRenderMul FinalR FinalG FinalB Ambient_Mult Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation SKY_BRIGHTNESS_DAY SKY_BRIGHTNESS_NIGHT BLEND_FACTOR FLICKER_REDUCTION MOTION_REJECTION VL_SAMPLES Exposure_Speed POM_MAP_RES POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL ATMOSPHERIC_DENSITY CLOUDS_SHADOWS_STRENGTH moon_illuminance moonColorR moonColorG moonColorB fog_mieg1 fog_mieg2 fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius SSAO_SAMPLES Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Mie_Phase Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK RENDER_SCALE_X RENDER_SCALE_Y VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ cloudDensity cloudCoverage fbmAmount fbmPower1 fbmPower2 cloudMieG cloudMieG2 cloudMie2Multiplier Strong_SSS_strength Medium_SSS_strength Weak_SSS_strength Shadow_brightness Roughness_Threshold Sun_specular_Strength reflection_quality Roughness_Strength SSS_mode DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS
screen.columns=2
screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds] [Misc_Settings] [Climate]
@ -62,14 +62,14 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
screen.Shadows = SCREENSPACE_CONTACT_SHADOWS Stochastic_Transparent_Shadows SHADOW_FRUSTRUM_CULLING CAVE_LIGHT_LEAK_FIX <skip> [Filtering] shadowMapResolution shadowDistance shadowDistanceRenderMul
screen.Subsurface_Scattering.columns=1
screen.Subsurface_Scattering = Variable_Penumbra_Shadows Ambient_SSS <empty> SSS_TYPE LabSSS_Curve <empty> mob_SSS misc_block_SSS
screen.Subsurface_Scattering = Variable_Penumbra_Shadows Ambient_SSS <empty> SSS_TYPE LabSSS_Curve <empty> mob_SSS misc_block_SSS ambientsss_brightness
screen.Filtering.columns=1
screen.Filtering = Variable_Penumbra_Shadows VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Max_Filter_Depth SHADOW_FILTER_SAMPLE_COUNT
### AMBIENT LIGHT
screen.Ambient_light.columns=1
screen.Ambient_light = [Torch_Colors] [Ambient_Colors] <skip> Ambient_SSS indirect_effect AO_Strength GI_Strength ambientOcclusionLevel HQ_SSGI
screen.Ambient_light = [Torch_Colors] [Ambient_Colors] <skip> Ambient_SSS indirect_effect AO_Strength GI_Strength ambientOcclusionLevel HQ_SSGI ambientsss_brightness
screen.Torch_Colors.columns=1
screen.Torch_Colors = TORCH_AMOUNT Emissive_Brightness Emissive_Curve <skip> TORCH_R TORCH_G TORCH_B