Add simple fisheye effect

This commit is contained in:
Merlin1809
2025-11-30 03:05:16 +01:00
parent 761fc310ab
commit ed9009396c
7 changed files with 27 additions and 8 deletions
+1 -1
View File
@@ -526,7 +526,7 @@ void main() {
#if REPLACE_SHORT_GRASS < 2 && !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
// darken the top of grass blocks a bit
if(data_in.blockID == 85 && flatNormals.y > abs(0.9) && !ShaderGrass) Albedo.rgb *= smoothstep(-30.0, 25.0, length(playerpos));
if(data_in.blockID == 85 && flatNormals.y > 0.9 && !ShaderGrass) Albedo.rgb *= smoothstep(-30.0, 25.0, length(playerpos));
#endif
#if defined DISTANT_HORIZONS && DH_CHUNK_FADING > 0
+2 -2
View File
@@ -494,7 +494,7 @@ vec2 SSRT_Shadows(vec3 viewPos, bool depthCheck, vec3 lightDir, float noise, boo
for (int i = 0; i < int(samples); i++) {
if (newPos.x < 0.0 || newPos.y < 0.0 || newPos.x > 1.0 || newPos.y > 1.0) break;
float sampleDepth;
float sampleDepth = 0.0;
#if defined DISTANT_HORIZONS || defined VOXY
if(depthCheck) {
@@ -1505,7 +1505,7 @@ void main() {
vec3 newViewPos = viewPos + vec3(-0.25, 0.2, 0.0);
float flashlightshadows = SSRT_FlashLight_Shadows(toScreenSpace_DH(texcoord/RENDER_SCALE, z, DH_depth1), isDHrange, -newViewPos, blueNoise(), FlatNormals, hand);
#else
float flashlightshadows = 1.0;
const float flashlightshadows = 1.0;
#endif
Indirect_lighting += flashlightshadows*calculateFlashlight(texcoord, viewPos, albedoSmooth, slopednormal, flashLightSpecularData, hand);
+14 -1
View File
@@ -163,7 +163,20 @@ void main() {
#elif defined PIXELATED
vec3 COLOR = texelFetch(colortex7, ivec2(gl_FragCoord.xy)-ivec2(mod(gl_FragCoord.xy, PIXELIZATION_STRENGTH)),0).rgb;
#else
vec3 COLOR = texture2D(colortex7,texcoord).rgb;
#ifdef FISHEYE_EFFECT
vec2 _texcoord = texcoord - vec2(0.5);
float dist = length(_texcoord);
float dist2 = dist * (1.0 - FISHEYE_STRENGTH * dist * dist);
_texcoord = _texcoord * dist2 / dist;
_texcoord += vec2(0.5);
vec3 COLOR = texture2D(colortex7, _texcoord).rgb;
#else
vec3 COLOR = texture2D(colortex7, texcoord).rgb;
#endif
#endif
#if defined LOW_HEALTH_EFFECT || defined DAMAGE_TAKEN_EFFECT || defined WATER_ON_CAMERA_EFFECT
+4 -1
View File
@@ -1,6 +1,6 @@
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
prefix.SHADER_VERSION_LABEL = V
value.SHADER_VERSION_LABEL.482 = 5.4.2
value.SHADER_VERSION_LABEL.482 = 5.4.3
# if you're here to translate, this is not a joke, these do what they say
profile.POTATO=§4Potato
@@ -925,6 +925,9 @@ option.EMISSIVE_ORES_STRENGTH = Emissive Ores Brightness
option.PLANET_CURVATURE = Planet Curvature §c(VOXY NOT SUPPORTED!)
option.CURVATURE_AMOUNT = Curvature Amount
option.FISHEYE_EFFECT = Fisheye Effect
option.FISHEYE_STRENGTH = Fisheye Strength
screen.selection_box_outline = Selection Box Outline
option.SELECT_BOX = Selection Box
option.RAINBOW_SELECT_BOX = Rainbow Selection Box
+1 -1
View File
@@ -1,6 +1,6 @@
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - Bliss 编辑版
prefix.SHADER_VERSION_LABEL = 版本
value.SHADER_VERSION_LABEL.482 = 5.4.2
value.SHADER_VERSION_LABEL.482 = 5.4.3
# 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名
profile.POTATO=§4土豆 (极低配置)
+3
View File
@@ -790,6 +790,9 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
#define MAX_COLORS_PER_CHANNEL 0 // [0 4 8 16 32 64 128 256 512]
#define FISHEYE_STRENGTH 0.2 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
// #define FISHEYE_EFFECT
///////////////////////////////////////////////////////
// ----- GAMEPLAY POST EFFECT RELATED SETTINGS ----- //
///////////////////////////////////////////////////////
File diff suppressed because one or more lines are too long