@@ -24,7 +24,7 @@ vec4 dissolve_mask(vec4 tex, vec2 texture_coords, vec2 uv)
2424 float t = time * 10.0 + 2003 .;
2525 vec2 floored_uv = (floor ((uv* texture_details.ba)))/ max (texture_details.b, texture_details.a);
2626 vec2 uv_scaled_centered = (floored_uv - 0.5 ) * 2.3 * max (texture_details.b, texture_details.a);
27-
27+
2828 vec2 field_part1 = uv_scaled_centered + 50 .*vec2 (sin (- t / 143.6340 ), cos (- t / 99.4324 ));
2929 vec2 field_part2 = uv_scaled_centered + 50 .*vec2 (cos ( t / 53.1532 ), cos ( t / 61.4532 ));
3030 vec2 field_part3 = uv_scaled_centered + 50 .*vec2 (sin (- t / 87.53218 ), sin (- t / 49.0000 ));
@@ -134,12 +134,12 @@ vec4 RGBtoHSV(vec4 rgb)
134134
135135vec4 HSVtoRGB(vec4 hsv) {
136136 vec4 rgb;
137-
137+
138138 float h = hsv.x * 6.0 ;
139139 float c = hsv.z * hsv.y;
140140 float x = c * (1.0 - abs (mod (h, 2.0 ) - 1.0 ));
141141 float m = hsv.z - c;
142-
142+
143143 if (h < 1.0 ) {
144144 rgb = vec4 (c, x, 0.0 , hsv.a);
145145 } else if (h < 2.0 ) {
@@ -153,27 +153,27 @@ vec4 HSVtoRGB(vec4 hsv) {
153153 } else {
154154 rgb = vec4 (c, 0.0 , x, hsv.a);
155155 }
156-
156+
157157 rgb.rgb += m;
158-
158+
159159 return rgb;
160160}
161161vec3 increaseContrast(vec3 color, float amount)
162162{
163163 // Convert from [0,1] to [-0.5,0.5] range
164164 vec3 centered = color - 0.5 ;
165-
165+
166166 // Increase contrast
167167 centered *= amount;
168-
168+
169169 // Convert back to [0,1] range and clamp
170170 return clamp (centered + 0.5 , 0.0 , 1.0 );
171171}
172172vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords )
173173{
174174 vec4 tex = Texel(texture, texture_coords);
175175 vec2 uv = (((texture_coords)* (image_details)) - texture_details.xy* texture_details.ba)/ texture_details.ba;
176-
176+
177177 // Dummy, doesn't do anything but at least it makes the shader useable
178178 if (uv.x > uv.x * 2 .){
179179 uv = oversat;
@@ -192,7 +192,7 @@ vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords
192192 float t = oversat.y* 2.221 + time;
193193 vec2 floored_uv = (floor ((uv* texture_details.ba)))/ texture_details.ba;
194194 vec2 uv_scaled_centered = (floored_uv - 0.5 ) * 50 .;
195-
195+
196196 vec2 field_part1 = uv_scaled_centered + 50 .*vec2 (sin (- t / 143.6340 ), cos (- t / 99.4324 ));
197197 vec2 field_part2 = uv_scaled_centered + 50 .*vec2 (cos ( t / 53.1532 ), cos ( t / 61.4532 ));
198198 vec2 field_part3 = uv_scaled_centered + 50 .*vec2 (sin (- t / 87.53218 ), sin (- t / 49.0000 ));
0 commit comments