Clean code, improve settings layouts. add handheld light brightness

This commit is contained in:
Xonk
2026-01-20 20:05:33 -05:00
parent be1a39b9ca
commit d69cdf0c15
15 changed files with 303 additions and 350 deletions
+2 -2
View File
@@ -67,11 +67,11 @@ void main() {
vec4 viewPos = gl_ModelViewMatrix * vPos;
localPos = gbufferModelViewInverse * viewPos;
#ifdef PLANET_CURVATURE
#if CURVATURE_AMOUNT != 0
vec4 worldPos = localPos;
float curvature = length(worldPos) / (16*8);
worldPos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldPos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
worldPos = gbufferModelView * worldPos;
+2 -2
View File
@@ -63,9 +63,9 @@ void main() {
// worldpos.y -= length(worldpos)/(16*2);
#ifdef PLANET_CURVATURE
#if CURVATURE_AMOUNT != 0
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldpos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
#endif
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
+2 -11
View File
@@ -42,7 +42,6 @@ uniform ivec2 eyeBrightnessSmooth;
uniform int heldItemId;
uniform int heldItemId2;
flat varying float HELD_ITEM_BRIGHTNESS;
#include "/lib/TAA_jitter.glsl"
@@ -89,14 +88,6 @@ void main() {
normalMat = vec4(normalize(gl_NormalMatrix * gl_Normal), 1.0);
#endif
// HELD_ITEM_BRIGHTNESS = 0.0;
// #ifdef Hand_Held_lights
// if(heldItemId > 999 || heldItemId2 > 999) HELD_ITEM_BRIGHTNESS = 0.9;
// #endif
#if defined WEATHER || defined LINES
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz;
@@ -112,9 +103,9 @@ void main() {
}
#endif
#if defined LINES && defined PLANET_CURVATURE
#if defined LINES && CURVATURE_AMOUNT != 0
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldpos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
#endif
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
+2 -8
View File
@@ -38,7 +38,6 @@ flat varying float EMISSIVE;
flat varying int LIGHTNING;
flat varying int PORTAL;
flat varying int SIGN;
// flat varying float HELD_ITEM_BRIGHTNESS;
flat varying float blockID;
flat varying int NameTags;
@@ -223,11 +222,6 @@ void main() {
LIGHTNING = 0;
// if(NameTags > 0) EMISSIVE = 0.9;
// HELD_ITEM_BRIGHTNESS = 0.0;
// #ifdef Hand_Held_lights
// if(heldItemId > 999 || heldItemId2 > 999 ) HELD_ITEM_BRIGHTNESS = 0.9;
// #endif
// normal block lightsources
if(mc_Entity.x >= 100 && mc_Entity.x < 300) EMISSIVE = 0.5;
@@ -331,9 +325,9 @@ void main() {
}
#endif
#ifdef PLANET_CURVATURE
#if CURVATURE_AMOUNT != 0
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldpos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
#endif
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
+2 -9
View File
@@ -78,7 +78,6 @@ uniform float screenBrightness;
uniform int heldItemId;
uniform int heldItemId2;
// flat varying float HELD_ITEM_BRIGHTNESS;
uniform vec2 texelSize;
@@ -171,9 +170,9 @@ void main() {
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz;
#ifdef PLANET_CURVATURE
#if CURVATURE_AMOUNT != 0
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldpos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
#endif
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
@@ -182,12 +181,6 @@ void main() {
gl_Position = toClipSpace3(position);
#endif
// HELD_ITEM_BRIGHTNESS = 0.0;
// #ifdef Hand_Held_lights
// if(heldItemId > 999 || heldItemId2 > 999) HELD_ITEM_BRIGHTNESS = 0.9;
// #endif
// 1.0 = water mask
// 0.9 = entity mask
// 0.8 = reflective entities
+7 -4
View File
@@ -477,20 +477,23 @@ void doEdgeAwareBlur(
);
for(int i = 0; i < 4; i++) {
ivec2 offset = OFFSET[i];
#ifdef USING_LOD_MOD
float offsetDepth = sqrt(texelFetch(depth, UV + OFFSET[i] + UV_NOISE,0).a/65000.0);
float offsetDepth = sqrt(texelFetch(depth, UV + offset + UV_NOISE,0).a/65000.0);
#else
float offsetDepth = ld(convertHandDepth_2(texelFetch(depth, UV + OFFSET[i] + UV_NOISE, 0).r,hand));
float offsetDepth = ld(convertHandDepth_2(texelFetch(depth, UV + offset + UV_NOISE, 0).r,hand));
#endif
float edgeDiff = abs(offsetDepth - referenceDepth) < threshold ? 1.0 : 1e-7;
#ifdef Variable_Penumbra_Shadows
shadow_RESULT += texelFetch(tex1, UV + OFFSET[i] + UV_NOISE, 0).rgb*edgeDiff;
shadow_RESULT += texelFetch(tex1, UV + offset + UV_NOISE, 0).rgb*edgeDiff;
#endif
#if indirect_effect == SSAO_FILTERED
ssao_RESULT += texelFetch(tex2, UV + OFFSET[i] + UV_NOISE, 0).rg*edgeDiff;
ssao_RESULT += texelFetch(tex2, UV + offset + UV_NOISE, 0).rg*edgeDiff;
#endif
edgeSum += edgeDiff;
+38 -35
View File
@@ -141,14 +141,14 @@ screen.Direct_Light = Direct Light
screen.Ambient_light = Ambient Light
screen.LPV = FloodFill Colored Lighting §cⓘ IRIS REQUIRED§r
option.LPV_ENABLED = Enabled
option.LPV_SIZE = Size
value.LPV_SIZE.6 = Small [64]
value.LPV_SIZE.7 = Medium [128]
value.LPV_SIZE.8 = Large [256]
option.LPV_ENABLED = FloodFill Colored Lighting
option.LPV_SIZE = FloodFill Render Distance
value.LPV_SIZE.6 = 4 chunks
value.LPV_SIZE.7 = 8 chunks
value.LPV_SIZE.8 = 16 chunks
option.LPV_SATURATION = Light Saturation
suffix.LPV_SATURATION=%
option.LPV_TINT_SATURATION = Tint Saturation
option.LPV_TINT_SATURATION = Glass Tint Saturation
suffix.LPV_TINT_SATURATION=%
option.LPV_NORMAL_STRENGTH = Normal Strength
suffix.LPV_NORMAL_STRENGTH = %
@@ -160,16 +160,17 @@ screen.Ambient_light = Ambient Light
option.LPV_VL_FOG_ILLUMINATION = Fog Light Propagation
option.LPV_VL_FOG_ILLUMINATION_BRIGHTNESS = Fog Light Propagation Brightness
suffix.LPV_VL_FOG_ILLUMINATION_BRIGHTNESS=%
option.VANILLA_LIGHTMAP_MASK = Vanilla Torch lightmap Mask
option.AO_in_sunlight = Apply AO to sunlight
option.AO_Strength = AO Multiplier
option.GI_Strength = GI Multiplier
option.HQ_SSGI = Long Range Marching (SSRT)
option.LONG_RANGE_SSRT = Long Range Marching (SSRT)
option.UseQuarterResDepth = sample 1/4 resolution depth (SSRT)
option.Hand_Held_lights = Hand Held Light
option.SKY_CONTRIBUTION_IN_SSRT = High Quality Ambient Light (SSRT)
option.ambientOcclusionLevel = Vanilla AO Amount
option.ambient_brightness = Ambient Light Brightness
option.MIN_LIGHT_AMOUNT = Minimum Light Brightness
option.MINIMUM_OUTDOOR_LIGHT = Minimum Light Brightness §bⓘ Outdoors§
option.MINIMUM_INDOOR_LIGHT = Minimum Light Brightness §bⓘ Indoors§
option.indirect_effect = Indirect Lighting
value.indirect_effect.VANILLA_AO = Vanilla AO
value.indirect_effect.SSAO_FILTERED = SSAO
@@ -178,19 +179,16 @@ screen.Ambient_light = Ambient Light
value.indirect_effect.SSRT_AO = SSRT (AO only) §c⚠ LOTS OF VISUAL NOISE§r
value.indirect_effect.SSRT_AO_GI = SSRT (AO + GI) §c⚠ LOTS OF VISUAL NOISE§r
screen.Ambient_Colors = Ambient Light Color
option.AmbientLight_R = Red Amount
option.AmbientLight_G = Green Amount
option.AmbientLight_B = Blue Amount
option.ambient_colortype = Coloring Type
value.ambient_colortype.0 = Temperature
value.ambient_colortype.1 = RGB
screen.INDIRECT_LIGHT_COLORS = Lighting Colors
option.ambient_brightness = Ambient Light Brightness
option.AmbientLight_R = ↑ Light Color R
option.AmbientLight_G = ↑ Light Color G
option.AmbientLight_B = ↑ Light Color B
screen.Torch_Colors = Torch Color
option.TORCH_AMOUNT = Torch Light Multiplier
option.TORCH_R = Red Amount
option.TORCH_G = Green Amount
option.TORCH_B = Blue Amount
option.TORCH_AMOUNT = Torch Light Brightness
option.TORCH_R = ↑ Light Color R
option.TORCH_G = ↑ Light Color G
option.TORCH_B = ↑ Light Color B
option.HANDHELD_LIGHTSOURCE_MODE = Handheld Light Mode
value.HANDHELD_LIGHTSOURCE_MODE.0 = §cOFF
@@ -198,17 +196,19 @@ screen.Ambient_light = Ambient Light
value.HANDHELD_LIGHTSOURCE_MODE.2 = Flashlight §bⓘ From Lightsource Items§
value.HANDHELD_LIGHTSOURCE_MODE.3 = Flashlight §bⓘ Always on§r
screen.HANDHELD_LIGHTSOURCE_SETTINGS = Handheld Lightsource Settings
screen.HANDHELD_LIGHTSOURCE_SETTINGS = Handheld Light Settings
option.HANDHELD_LIGHTSOURCE_RANGE = Handheld Light Range
value.HANDHELD_LIGHTSOURCE_RANGE.0 = Use Held Item's Light Level
value.HANDHELD_LIGHTSOURCE_RANGE.1 = 1 block
suffix.HANDHELD_LIGHTSOURCE_RANGE = §c§r blocks
option.HANDHELD_LIGHTSOURCE_BRIGHTNESS = Handheld Light brightness
option.HANDHELD_LIGHTSOURCE_RANGE = Handheld Light Range
option.HANDHELD_LIGHTSOURCE_SPECULAR = Reflections from Handheld Light
option.HANDHELD_LIGHTSOURCE_R = Light Color R
option.HANDHELD_LIGHTSOURCE_G = Light Color G
option.HANDHELD_LIGHTSOURCE_B = Light Color B
option.HANDHELD_LIGHTSOURCE_R = ↑ Light Color R
option.HANDHELD_LIGHTSOURCE_G = ↑ Light Color G
option.HANDHELD_LIGHTSOURCE_B = ↑ Light Color B
option.HANDHELD_LIGHTSOURCE_SSRT_SHADOWS = Shadows from Handheld Light
value.HANDHELD_LIGHTSOURCE_SSRT_SHADOWS.0 = §cOFF
value.HANDHELD_LIGHTSOURCE_SSRT_SHADOWS.1 = ON §bⓘ First & Third Person§r
@@ -225,8 +225,7 @@ screen.Ambient_light = Ambient Light
screen.Ambient_light.comment = Configure settings related to the lighting in shaded places
option.AO_Strength.comment = Configure the strength of the ambient occlusion created by SSAO, GTAO, and SSRT. §bⓘ What is this?§r ambient occlusion is the small soft shadows in corners and such.
option.GI_Strength.comment = Configure the strength of the global illumination created by SSRT. §bⓘ What is this?§r global illumination in this scenario specifically is the light bouncing off a surface and onto some other area.
option.HQ_SSGI.comment = Toggle long range screen-space raytracing. this will allow SSRT lighting to travel ALOT farther within the scene from where it bounces/casts shadows. §a⚠ PERFORMANCE COST:§r very high
option.Hand_Held_lights.comment = Toggle shader-side hand held lightsources. §a⚠ PERFORMANCE COST:§r very low
option.LONG_RANGE_SSRT.comment = Toggle long range screen-space raytracing. this will allow SSRT lighting to travel ALOT farther within the scene from where it bounces/casts shadows. §a⚠ PERFORMANCE COST:§r very high
option.SKY_CONTRIBUTION_IN_SSRT.comment = Allow the SSRT to take the entire sky and fog into account to create high quality lighting for shaded areas. This may introduce more noise. §a⚠ PERFORMANCE COST:§r medium
option.ambientOcclusionLevel.comment = Configure the strength of the ambient occlusion from vanilla minecraft. §bⓘ What is this?§r This ambient occlusion is in minecraft even without shaders enabled.
@@ -237,9 +236,9 @@ screen.Ambient_light = Ambient Light
screen.Ambient_Colors.comment = Configure the color of light in shaded areas.
screen.Torch_Colors.comment = Configure the color of light from torches or other placed lightsources.
option.LPV_SIZE.comment = Configures the size (in blocks) of the volume for colored lighting.
option.LPV_SATURATION.comment = Configures the intensity of colored lighting.
option.LPV_TINT_SATURATION.comment = Configures the intensity of tinting by translucent blocks on colored lighting.
option.LPV_SIZE.comment = Configures the size of the volume for colored lighting.
option.LPV_SATURATION.comment = Configures how intense the color is for colored lighting.
option.LPV_TINT_SATURATION.comment = Configures how intense the color is for colored lighting passing through translucent things like stained glass.
option.LPV_NORMAL_STRENGTH.comment = Configure the amount surface normals will affect lighting direction.
option.LPV_ENTITY_LIGHTS.comment = Allows entities to contribute to colored lighting.
option.LPV_REDSTONE_LIGHTS.comment = Allows redstone blocks to contribute to colored lighting.
@@ -985,10 +984,14 @@ screen.Water = Water Settings
###################################################### ↓↓↓ THIS SUBMENU'S LABELS
screen.World = World
screen.Waving_Stuff = Waving Stuff
option.WAVY_PLANTS = Waving Plants
option.WAVY_STRENGTH = Waving Strength
option.WAVY_SPEED = Waving Speed
option.WAVY_SPEED = Waving Foliage Speed
option.FOLIAGE_ANIMATION_AMOUNT = Waving Foliage Amount
value.FOLIAGE_ANIMATION_AMOUNT.0 = §cOFF
suffix.FOLIAGE_ANIMATION_AMOUNT = %
option.CURVATURE_AMOUNT = Planet Curvature Amount
value.CURVATURE_AMOUNT.0 = §cOFF
suffix.CURVATURE_AMOUNT = %
option.SKY_GROUND = Atmosphere ground
+1 -1
View File
@@ -87,7 +87,7 @@ vec3 sky_opticalDepth(vec3 position, vec3 direction, const float steps) {
}
vec3 sky_transmittance(vec3 position, vec3 direction, const float steps) {
return exp(-sky_opticalDepth(position, direction, steps) * rLOG2);
return exp2(-sky_opticalDepth(position, direction, steps) * rLOG2);
}
+6 -14
View File
@@ -52,17 +52,6 @@ vec3 doBlockLightLighting(
// outside the voxel volume, lerp to vanilla lighting as a fallback
blockLight = mix(blockLight, lpvSample.rgb + lightColor * 2.5 * min(max(lightmap-0.999,0.0)/(1.0-0.999),1.0), voxelRangeFalloff);
// #ifdef Hand_Held_lights
// // create handheld lightsources
// const vec3 normal = vec3(0.0); // TODO
// if (heldItemId > 0)
// blockLight += GetHandLight(heldItemId, playerPos, normal);
// if (heldItemId2 > 0)
// blockLight += GetHandLight(heldItemId2, playerPos, normal);
// #endif
#endif
return blockLight * TORCH_AMOUNT;
@@ -141,6 +130,7 @@ void calculateFinishedPointLight(
inout vec3 handPos, inout vec3 lighting
){
if(lightLevel > 1e-6){
// in third person, mirror positions when backfacing third person is used.
float headViewDir = max((mat3(gbufferModelView) * playerLookVector).z,0);
@@ -164,15 +154,15 @@ void calculateFinishedPointLight(
lighting = sampledLightColor.rgb;
float lightRange = sampledLightColor.a;
// ensure that there is color if no light item is held.
// ensure that there is color if no light item is held. or if the light item is not listed.
#if HANDHELD_LIGHTSOURCE_MODE == 3
if(heldItemId < 1){
lighting = vec3(HANDHELD_LIGHTSOURCE_R,HANDHELD_LIGHTSOURCE_G,HANDHELD_LIGHTSOURCE_B);
lighting = vec3(HANDHELD_LIGHTSOURCE_R, HANDHELD_LIGHTSOURCE_G, HANDHELD_LIGHTSOURCE_B);
lightRange = 15.0;
}
#else
if(heldItemId < 1){
lighting = vec3(HANDHELD_LIGHTSOURCE_R,HANDHELD_LIGHTSOURCE_G,HANDHELD_LIGHTSOURCE_B);
lighting = vec3(HANDHELD_LIGHTSOURCE_R, HANDHELD_LIGHTSOURCE_G, HANDHELD_LIGHTSOURCE_B);
lightRange = lightLevel;
lighting *= lightRange/15.0;
}
@@ -237,4 +227,6 @@ void doHandHeldLight(
calculateFinishedPointLight(viewPos, normal, float(heldBlockLightValue2), heldItemId2, vec3( 0.25, 0.1-playerLookVector.y*0.2, 0.1), passOffHandPos, passOffHandCol);
#endif
passMainHandCol *= HANDHELD_LIGHTSOURCE_BRIGHTNESS;
passOffHandCol *= HANDHELD_LIGHTSOURCE_BRIGHTNESS;
}
+1 -1
View File
@@ -196,7 +196,7 @@ vec3 ApplySSRT(
vec2 ij = fract(R2_samples(seed) + noise.xy);
vec3 rayDir = TangentToWorld(normal, normalize(cosineHemisphereSample(ij)));
#ifdef HQ_SSGI
#ifdef LONG_RANGE_SSRT
vec3 rayHit = rayTrace_GI( mat3(gbufferModelView) * rayDir, viewPos, noise.z, 50.); // ssr rt
#else
vec3 rayHit = RT_alternate(mat3(gbufferModelView)*rayDir, viewPos, noise.z, 10., isLOD, CURVE); // choc sspt
+14 -13
View File
@@ -81,7 +81,7 @@
#define AO_in_sunlight
#define AO_Strength 1.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 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0]
// #define SKY_CONTRIBUTION_IN_SSRT
// #define HQ_SSGI
// #define LONG_RANGE_SSRT
#define GI_Strength 1.0 // [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 RAY_COUNT 4 // [1 2 3 4 5 6 7 8 9 10 12 14 16 18 21 24 28 32 37 43 49 57 65 75 86 100]
#define SEPARATE_AO
@@ -91,12 +91,13 @@
#if defined HANDHELD_LIGHTSOURCE_RELATED_SETTINGS
#define HANDHELD_LIGHTSOURCE_MODE 1 // [0 1 2 3]
#define HANDHELD_LIGHTSOURCE_RANGE 0 // [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 255]
#define HANDHELD_LIGHTSOURCE_RANGE 0 // [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 250 300 350 400 450 500 1000]
#define HANDHELD_LIGHTSOURCE_R 1.0 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
#define HANDHELD_LIGHTSOURCE_G 0.5 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
#define HANDHELD_LIGHTSOURCE_B 0.25 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
#define HANDHELD_LIGHTSOURCE_SPECULAR
#define HANDHELD_LIGHTSOURCE_SSRT_SHADOWS 2 // [0 1 2]
#define HANDHELD_LIGHTSOURCE_BRIGHTNESS 1.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 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0]
// #define FLASHLIGHT_BOUNCED_INDIRECT
// #define FLASHLIGHT_FOG_ILLUMINATION
@@ -104,11 +105,6 @@
#define FLASHLIGHT_SIZE 2.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 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0]
#define FLASHLIGHT_BRIGHTNESS_MULT 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0 49.0 50.0 60.0 70.0 80.0 90.0 100.0 ]
#define FLASHLIGHT_BRIGHTNESS_FALLOFF_MULT 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0 49.0 50.0 60.0 70.0 80.0 90.0 100.0 ]
// will fix later
#if HANDHELD_LIGHTSOURCE_MODE > 0
#define Hand_Held_lights
#endif
#endif
#if defined VOLUMETRIC_FOG_RELATED_SETTINGS
@@ -348,8 +344,13 @@
#endif
#if defined GEOMETRY_ANIMATION_RELATED_SETTINGS
#define WAVY_PLANTS
#define WAVY_STRENGTH 1.0 // [0.1 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0]
#define FOLIAGE_ANIMATION_AMOUNT 50 // [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100]
// do this a not shit way another time
#define WAVY_STRENGTH (float(FOLIAGE_ANIMATION_AMOUNT))/50.0f
#if FOLIAGE_ANIMATION_AMOUNT > 0
#define WAVY_PLANTS
#endif
#define WAVY_SPEED 1.0 // [0.001 0.01 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 1.0 1.25 1.5 2.0 3.0 4.0]
#endif
@@ -669,11 +670,8 @@
#define AEROCHROME_PINKNESS 0.3 // How pink it is from red [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631), AEROCHROME_PINKNESS);
#endif
// #define PLANET_CURVATURE
#if defined PLANET_CURVATURE
#define CURVATURE_AMOUNT 1.0 // [-10.0 -9.0 -8.0 -7.0 -6.0 -5.0 -4.0 -3.0 -2.0 -1.9 -1.8 -1.7 -1.6 -1.5 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.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 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0]
#endif
#define CURVATURE_AMOUNT 0 // [-100 -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 -51 -50 -49 -48 -47 -46 -45 -44 -43 -42 -41 -40 -39 -38 -37 -36 -35 -34 -33 -32 -31 -30 -29 -28 -27 -26 -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100]
#define RESOURCEPACK_SKY 0 // [0 1 2 3]
#define LIGHTLEAKFIX_MODE 1 // [0 1 2]
#define PLANET_GROUND_BRIGHTNESS 1.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 ]
@@ -899,6 +897,9 @@
#ifdef LABEL_0
#define LABEL_0 0 // [0]
#endif
#ifdef LABEL_1
#define LABEL_1 0 // [0]
#endif
#ifdef TERRIBLE_SSR_LOD_FALLBACK
#endif
#ifdef HANDHELD_LIGHTSOURCE_SPECULAR
+220 -244
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -260,9 +260,9 @@ void main() {
}
#endif
#ifdef PLANET_CURVATURE
#if CURVATURE_AMOUNT != 0
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldpos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
#endif
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
+2 -2
View File
@@ -260,9 +260,9 @@ void main() {
}
#endif
#ifdef PLANET_CURVATURE
#if CURVATURE_AMOUNT != 0
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldpos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
#endif
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
@@ -260,9 +260,9 @@ void main() {
}
#endif
#ifdef PLANET_CURVATURE
#if CURVATURE_AMOUNT != 0
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldpos.y -= curvature*curvature * (float(CURVATURE_AMOUNT)/10.0f);
#endif
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;