mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-23 01:59:39 +08:00
make physics mod support toggle for AMD people
This commit is contained in:
parent
cb404760be
commit
cf945dcb8c
@ -319,8 +319,9 @@ if (gl_FragCoord.x * texelSize.x < RENDER_SCALE.x && gl_FragCoord.y * texelSize
|
|||||||
normal = applyBump(tbnMatrix, NormalTex.xyz, 1.0);
|
normal = applyBump(tbnMatrix, NormalTex.xyz, 1.0);
|
||||||
|
|
||||||
if (iswater > 0.95){
|
if (iswater > 0.95){
|
||||||
|
#ifdef PhysicsMod_support
|
||||||
//if(physics_iterationsNormal < 1.0){
|
if(physics_iterationsNormal < 1.0){
|
||||||
|
#endif
|
||||||
float bumpmult = 1.;
|
float bumpmult = 1.;
|
||||||
vec3 bump = vec3(0);
|
vec3 bump = vec3(0);
|
||||||
vec3 posxz = p3+cameraPosition;
|
vec3 posxz = p3+cameraPosition;
|
||||||
@ -334,27 +335,29 @@ 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);
|
bump = bump * vec3(bumpmult, bumpmult, bumpmult) + vec3(0.0f, 0.0f, 1.0f - bumpmult);
|
||||||
normal = normalize(bump * tbnMatrix);
|
normal = normalize(bump * tbnMatrix);
|
||||||
|
|
||||||
|
#ifdef PhysicsMod_support
|
||||||
|
}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;
|
||||||
|
|
||||||
//}else{
|
|
||||||
// /// ------ PHYSICS MOD OCEAN SHIT ------ ///
|
normal = normalize(worldToView(wave.normal) + mix(normal, vec3(0.0), clamp(physics_localWaviness,0.0,1.0)));
|
||||||
//
|
|
||||||
// WavePixelData wave = physics_wavePixel(physics_localPosition.xz, physics_localWaviness, physics_iterationsNormal, physics_gameTime);
|
vec3 worldSpaceNormal = normal;
|
||||||
// // float Foam = wave.foam;
|
|
||||||
//
|
vec3 bitangent = normalize(cross(tangent.xyz, worldSpaceNormal));
|
||||||
// // Albedo = mix(Albedo,vec3(1),Foam);
|
mat3 tbn_new = mat3(tangent.xyz, binormal, worldSpaceNormal);
|
||||||
// // gl_FragData[0].a = Foam;
|
vec3 tangentSpaceNormal = worldSpaceNormal * tbn_new;
|
||||||
//
|
|
||||||
//
|
TangentNormal = tangentSpaceNormal.xy * 0.5 + 0.5;
|
||||||
// normal = normalize(worldToView(wave.normal) + mix(normal, vec3(0.0), clamp(physics_localWaviness,0.0,1.0)));
|
}
|
||||||
//
|
#endif
|
||||||
// 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
|
// cannot encode alpha or it will shit its pants
|
||||||
@ -439,8 +442,13 @@ if (gl_FragCoord.x * texelSize.x < RENDER_SCALE.x && gl_FragCoord.y * texelSize
|
|||||||
// snells window looking thing
|
// snells window looking thing
|
||||||
if(isEyeInWater == 1 && iswater > 0.99) fresnel = clamp(pow(1.66 + normalDotEye,25),0.02,1.0);
|
if(isEyeInWater == 1 && iswater > 0.99) fresnel = clamp(pow(1.66 + normalDotEye,25),0.02,1.0);
|
||||||
|
|
||||||
if(isEyeInWater == 1 && physics_iterationsNormal > 0.0) fresnel = clamp( 1.0 - (pow( normalDotEye * 1.66 ,25)),0.02,1.0);
|
|
||||||
|
#ifdef PhysicsMod_support
|
||||||
|
if(isEyeInWater == 1 && physics_iterationsNormal > 0.0) fresnel = clamp( 1.0 - (pow( normalDotEye * 1.66 ,25)),0.02,1.0);
|
||||||
|
#else
|
||||||
|
if(isEyeInWater == 1) fresnel = clamp( 1.0 - (pow( normalDotEye * 1.66 ,25)),0.02,1.0);
|
||||||
|
#endif
|
||||||
|
|
||||||
fresnel = mix(f0, 1.0, fresnel);
|
fresnel = mix(f0, 1.0, fresnel);
|
||||||
|
|
||||||
vec3 wrefl = mat3(gbufferModelViewInverse)*reflectedVector;
|
vec3 wrefl = mat3(gbufferModelViewInverse)*reflectedVector;
|
||||||
|
@ -73,6 +73,7 @@ void main() {
|
|||||||
|
|
||||||
vec4 Swtich_gl_vertex = gl_Vertex;
|
vec4 Swtich_gl_vertex = gl_Vertex;
|
||||||
|
|
||||||
|
#ifdef PhysicsMod_support
|
||||||
if(physics_iterationsNormal > 0.0){
|
if(physics_iterationsNormal > 0.0){
|
||||||
// basic texture to determine how shallow/far away from the shore the water is
|
// basic texture to determine how shallow/far away from the shore the water is
|
||||||
physics_localWaviness = texelFetch(physics_waviness, ivec2(gl_Vertex.xz) - physics_textureOffset, 0).r;
|
physics_localWaviness = texelFetch(physics_waviness, ivec2(gl_Vertex.xz) - physics_textureOffset, 0).r;
|
||||||
@ -83,6 +84,7 @@ void main() {
|
|||||||
|
|
||||||
Swtich_gl_vertex.xyz = finalPosition.xyz ;
|
Swtich_gl_vertex.xyz = finalPosition.xyz ;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
lmtexcoord.xy = (gl_MultiTexCoord0).xy;
|
lmtexcoord.xy = (gl_MultiTexCoord0).xy;
|
||||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 255.0; // is this even correct? lol
|
vec2 lmcoord = gl_MultiTexCoord1.xy / 255.0; // is this even correct? lol
|
||||||
|
@ -3,10 +3,9 @@
|
|||||||
#define PHYSICS_OCEAN_SUPPORT
|
#define PHYSICS_OCEAN_SUPPORT
|
||||||
// at the top of your file. When used my mod no longer injects code into
|
// at the top of your file. When used my mod no longer injects code into
|
||||||
// your shaderpack. It replaces this define statement (before compilation) with
|
// your shaderpack. It replaces this define statement (before compilation) with
|
||||||
#define PHYSICS_OCEAN
|
|
||||||
// so you can use
|
|
||||||
#ifdef PHYSICS_OCEAN
|
#ifdef PhysicsMod_support
|
||||||
#endif
|
|
||||||
// to customize the water for the physics ocean
|
// to customize the water for the physics ocean
|
||||||
|
|
||||||
// just some basic consts for the wave function based on afl_ext's shader https://www.shadertoy.com/view/Xdlczl
|
// just some basic consts for the wave function based on afl_ext's shader https://www.shadertoy.com/view/Xdlczl
|
||||||
@ -220,4 +219,5 @@ WavePixelData physics_wavePixel(const in vec2 position, const in float factor, c
|
|||||||
data.foam = clamp(waterFoamMaxSmooth * waterSurfaceNoise * physics_foamOpacity, 0.0, 1.0);
|
data.foam = clamp(waterFoamMaxSmooth * waterSurfaceNoise * physics_foamOpacity, 0.0, 1.0);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -417,4 +417,6 @@ const float shadowDistanceRenderMul = -1.0; //[-1.0 1.0] THIS WILL BREAK SUBSURF
|
|||||||
|
|
||||||
#define CompSky_R 0.0 // [ 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 ]
|
#define CompSky_R 0.0 // [ 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 ]
|
||||||
#define CompSky_G 0.0 // [ 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 ]
|
#define CompSky_G 0.0 // [ 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 ]
|
||||||
#define CompSky_B 0.0 // [ 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 ]
|
#define CompSky_B 0.0 // [ 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 ]
|
||||||
|
|
||||||
|
// #define PhysicsMod_support // CURRENTLY BREAKS THE WHOLE SHADER WITH AMD
|
@ -44,7 +44,7 @@ alphaTest.gbuffers_hand=true
|
|||||||
sliders = SCALE_FACTOR CompSky_R CompSky_G CompSky_B 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
|
sliders = SCALE_FACTOR CompSky_R CompSky_G CompSky_B 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.columns=2
|
||||||
screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds] [Misc_Settings] [Climate]
|
screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds] [Misc_Settings] [Climate] <empty> <empty> PhysicsMod_support
|
||||||
|
|
||||||
# screen = [Direct_Light] [World]
|
# screen = [Direct_Light] [World]
|
||||||
# [Ambient_light] [Fog]
|
# [Ambient_light] [Fog]
|
||||||
@ -177,7 +177,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
|
|||||||
screen.Editing = Compositing_Sky CompSky_R CompSky_G CompSky_B
|
screen.Editing = Compositing_Sky CompSky_R CompSky_G CompSky_B
|
||||||
######## MISC SETTINGS
|
######## MISC SETTINGS
|
||||||
screen.Misc_Settings.columns=1
|
screen.Misc_Settings.columns=1
|
||||||
screen.Misc_Settings = [the_orb] WhiteWorld ambientLight_only Glass_Tint display_LUT DISABLE_ALPHA_MIPMAPS ambientSSS_view
|
screen.Misc_Settings = [the_orb] WhiteWorld ambientLight_only Glass_Tint display_LUT ambientSSS_view
|
||||||
|
|
||||||
screen.the_orb.columns = 1
|
screen.the_orb.columns = 1
|
||||||
screen.the_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B
|
screen.the_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B
|
||||||
|
Loading…
Reference in New Issue
Block a user