diff --git a/assets/minecraft/shaders/core/particle.vsh b/assets/minecraft/shaders/core/particle.vsh index 7b95974..987198f 100644 --- a/assets/minecraft/shaders/core/particle.vsh +++ b/assets/minecraft/shaders/core/particle.vsh @@ -12,6 +12,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; out float vertexDistance; @@ -23,7 +24,7 @@ out vec4 maxLightColor; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); texCoord0 = UV0; vertexColor = Color; lightColor = minecraft_sample_lightmap(Sampler2, UV2); diff --git a/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.vsh b/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.vsh index 75006e4..03bf487 100644 --- a/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.vsh +++ b/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.vsh @@ -14,6 +14,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -30,7 +31,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_cutout.vsh b/assets/minecraft/shaders/core/rendertype_cutout.vsh index a60f868..66307ce 100644 --- a/assets/minecraft/shaders/core/rendertype_cutout.vsh +++ b/assets/minecraft/shaders/core/rendertype_cutout.vsh @@ -14,6 +14,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform vec3 ChunkOffset; out float vertexDistance; @@ -29,7 +30,7 @@ void main() { vec3 pos = Position + ChunkOffset; gl_Position = ProjMat * ModelViewMat * vec4(pos, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, pos); + vertexDistance = fog_distance(ModelViewMat, pos, FogShape); dimension = get_dimension(minecraft_sample_lightmap(Sampler2, ivec2(0.0, 0.0))); vertexColor = Color; lightColor = minecraft_sample_lightmap(Sampler2, UV2); diff --git a/assets/minecraft/shaders/core/rendertype_cutout_mipped.vsh b/assets/minecraft/shaders/core/rendertype_cutout_mipped.vsh index a60f868..66307ce 100644 --- a/assets/minecraft/shaders/core/rendertype_cutout_mipped.vsh +++ b/assets/minecraft/shaders/core/rendertype_cutout_mipped.vsh @@ -14,6 +14,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform vec3 ChunkOffset; out float vertexDistance; @@ -29,7 +30,7 @@ void main() { vec3 pos = Position + ChunkOffset; gl_Position = ProjMat * ModelViewMat * vec4(pos, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, pos); + vertexDistance = fog_distance(ModelViewMat, pos, FogShape); dimension = get_dimension(minecraft_sample_lightmap(Sampler2, ivec2(0.0, 0.0))); vertexColor = Color; lightColor = minecraft_sample_lightmap(Sampler2, UV2); diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout.vsh b/assets/minecraft/shaders/core/rendertype_entity_cutout.vsh index 2516aa9..8866c68 100644 --- a/assets/minecraft/shaders/core/rendertype_entity_cutout.vsh +++ b/assets/minecraft/shaders/core/rendertype_entity_cutout.vsh @@ -15,6 +15,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -31,7 +32,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.vsh b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.vsh index 2516aa9..8866c68 100644 --- a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.vsh +++ b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.vsh @@ -15,6 +15,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -31,7 +32,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.vsh b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.vsh index 2516aa9..8866c68 100644 --- a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.vsh +++ b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.vsh @@ -15,6 +15,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -31,7 +32,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_entity_no_outline.vsh b/assets/minecraft/shaders/core/rendertype_entity_no_outline.vsh index cb6d6d8..ea6651f 100644 --- a/assets/minecraft/shaders/core/rendertype_entity_no_outline.vsh +++ b/assets/minecraft/shaders/core/rendertype_entity_no_outline.vsh @@ -13,6 +13,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -28,7 +29,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_entity_solid.vsh b/assets/minecraft/shaders/core/rendertype_entity_solid.vsh index 2516aa9..8866c68 100644 --- a/assets/minecraft/shaders/core/rendertype_entity_solid.vsh +++ b/assets/minecraft/shaders/core/rendertype_entity_solid.vsh @@ -15,6 +15,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -31,7 +32,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_entity_translucent.vsh b/assets/minecraft/shaders/core/rendertype_entity_translucent.vsh index 2516aa9..8866c68 100644 --- a/assets/minecraft/shaders/core/rendertype_entity_translucent.vsh +++ b/assets/minecraft/shaders/core/rendertype_entity_translucent.vsh @@ -15,6 +15,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -31,7 +32,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_entity_translucent_cull.vsh b/assets/minecraft/shaders/core/rendertype_entity_translucent_cull.vsh index 2c1e196..2fbbaa1 100644 --- a/assets/minecraft/shaders/core/rendertype_entity_translucent_cull.vsh +++ b/assets/minecraft/shaders/core/rendertype_entity_translucent_cull.vsh @@ -14,6 +14,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -31,7 +32,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.vsh b/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.vsh index 2c1e196..2fbbaa1 100644 --- a/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.vsh +++ b/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.vsh @@ -14,6 +14,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform mat3 IViewRotMat; uniform vec3 Light0_Direction; @@ -31,7 +32,7 @@ out vec4 normal; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, IViewRotMat * Position); + vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); lightColor = minecraft_sample_lightmap(Sampler2, UV2); maxLightColor = minecraft_sample_lightmap(Sampler2, ivec2(240.0, 240.0)); diff --git a/assets/minecraft/shaders/core/rendertype_solid.vsh b/assets/minecraft/shaders/core/rendertype_solid.vsh index a60f868..66307ce 100644 --- a/assets/minecraft/shaders/core/rendertype_solid.vsh +++ b/assets/minecraft/shaders/core/rendertype_solid.vsh @@ -14,6 +14,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform vec3 ChunkOffset; out float vertexDistance; @@ -29,7 +30,7 @@ void main() { vec3 pos = Position + ChunkOffset; gl_Position = ProjMat * ModelViewMat * vec4(pos, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, pos); + vertexDistance = fog_distance(ModelViewMat, pos, FogShape); dimension = get_dimension(minecraft_sample_lightmap(Sampler2, ivec2(0.0, 0.0))); vertexColor = Color; lightColor = minecraft_sample_lightmap(Sampler2, UV2); diff --git a/assets/minecraft/shaders/core/rendertype_translucent.vsh b/assets/minecraft/shaders/core/rendertype_translucent.vsh index a60f868..66307ce 100644 --- a/assets/minecraft/shaders/core/rendertype_translucent.vsh +++ b/assets/minecraft/shaders/core/rendertype_translucent.vsh @@ -14,6 +14,7 @@ uniform sampler2D Sampler2; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; uniform vec3 ChunkOffset; out float vertexDistance; @@ -29,7 +30,7 @@ void main() { vec3 pos = Position + ChunkOffset; gl_Position = ProjMat * ModelViewMat * vec4(pos, 1.0); - vertexDistance = cylindrical_distance(ModelViewMat, pos); + vertexDistance = fog_distance(ModelViewMat, pos, FogShape); dimension = get_dimension(minecraft_sample_lightmap(Sampler2, ivec2(0.0, 0.0))); vertexColor = Color; lightColor = minecraft_sample_lightmap(Sampler2, UV2);