@@ -80,8 +80,6 @@ void main() {
8080
8181
8282// Options
83- // #define FOG_DENSITY 0.7 // [0, 1]
84- // #define FLUID_FOG_DENSITY 0.5 // [0, 1]
8583// #define DEBUG
8684
8785// Preprocessors
@@ -91,20 +89,13 @@ void main() {
9189#include "/ lib/ common.glsl"
9290
9391// Constants
94- /*
95- // const bool gaux1Clear = false;
96- */
9792
9893// Uniforms
9994uniform sampler2D lightmap;
100- uniform float blindness;
101- // TODO: change this to gtexture in iris 1.1.2
10295uniform sampler2D gtexture;
10396uniform vec4 entityColor;
10497uniform vec3 fogColor;
10598uniform vec3 skyColor;
106- // uniform float fogStart;
107- // uniform float fogEnd;
10899uniform float far;
109100uniform int isEyeInWater;
110101
@@ -123,25 +114,17 @@ RenderResult render() {
123114 #endif
124115
125116 vec3 light;
126- float brightness; // how bright the light is
127-
128- // apply blindness effect
129- #if defined(BLINDNESS)
130- brightness = 1 - blindness;
131- #else
132- brightness = 1 ;
133- #endif
134117
135118 // calculate lighting
136119 #if defined(LIGHTMAP)
137120 // https://github.com/XorDev/XorDevs-Default-Shaderpack/blob/c13319fb7ca1a178915fba3b18dee47c54903cc3/shaders/gbuffers_textured.fsh#L35
138121 // combine the lightmap with blindness
139- light = brightness * texture(lightmap, lmcoord).rgb;
122+ light = texture(lightmap, lmcoord).rgb;
140123 #else
141124 light = vec3 (1 );
142125 #endif
143126
144- color *= vec4 ( light, 1 ) ;
127+ color.rgb *= light;
145128
146129 // apply mob entity flashes
147130 #if defined(ENTITY_COLOR)
@@ -154,21 +137,11 @@ RenderResult render() {
154137 // calculate fog
155138 float fog = smoothstep (gl_Fog .start, gl_Fog .end, vertDist);
156139
157- // Note: I disabled this in favor of vanilla's fog color.
158- // mix fog color with sky color
159- // if (isEyeInWater == 0) {
160- // color.rgb = mix(color.rgb, skyColor.rgb, fog);
161- // }
162- // color.rgb = mix(color.rgb, fogColor.rgb, fog);
163140 color.rgb = mix (color.rgb, fogColor.rgb, fog);
164141
165142 // squares for debugging
166143 #ifdef DEBUG
167- if (gl_FragCoord .x >= 1499 && gl_FragCoord .y >= 800 ) {
168- color.rgb = vec3 (gl_Fog .start);
169- } else if (gl_FragCoord .x >= 1499 && gl_FragCoord .y >= 700 && gl_FragCoord .y <= 800 ) {
170- color.rgb = vec3 (gl_Fog .end);
171- }
144+ color.rgb = vec3 (blindness);
172145 #endif
173146 #endif
174147
0 commit comments