@@ -198,16 +198,16 @@ vec4 march(vec3 pos, vec3 dir, int depth) {
198
198
float weather_scale = 0.0001 ;
199
199
vec3 weather_sample = texture(weather, p.xz* weather_scale).xyz;
200
200
float t = density(p, weather_sample);
201
- float ldt = 0.5 ;
201
+ const float ldt = 0.2 ;
202
202
float dt = exp (- ldt* t* ss);// , exp(-ldt*0.25*t*ss)*0.8);
203
203
T *= dt;
204
204
vec3 lp = p;
205
205
float lT = 1.0 ;
206
206
if (t> 0.0 ) {
207
207
// play around with these values
208
- float smpd[6 ] = float [6 ](2.0 , 2.0 , 2.0 , 2.0 , 8.0 , 10 .0 );
208
+ float smpd[6 ] = float [6 ](0.01 , 0.01 , 0.02 , 0.1 , 0.4 , 5 .0 );
209
209
for (int j= 0 ;j< 6 ;j++ ) {
210
- lp += ldir* smpd[j]+ (RANDOM_VECTORS[j]* float (j)* lss) ;
210
+ lp += ( ldir* smpd[j]+ (RANDOM_VECTORS[j]* float (j))) * lss;
211
211
vec3 lweather = texture(weather, lp.xz* weather_scale).xyz;
212
212
float lt = density(lp, lweather);
213
213
const float ld = 1.0 ;
@@ -218,7 +218,7 @@ vec4 march(vec3 pos, vec3 dir, int depth) {
218
218
float powshug = 1.0 - exp (- ldt* t* ss* 2.0 );
219
219
powshug = mix (1 .0f, powshug, clamp ((- dot (normalize (ldir), normalize (dir)) * 0 .5f) + 0 .5f, 0.0 , 1.0 ));
220
220
vec3 ambient = getSkyColor()* mix (0.5 , 1.0 , height_fraction);
221
- L += (ambient + getSunColor()* lT* phase * powshug* 2.0 )* (1.0 - dt)* T* ss;
221
+ L += (getSunColor()* lT* powshug* 2.0 * phase )* (1.0 - dt)* T* ss;
222
222
}
223
223
L/= L+ 1.0 ;
224
224
// L = sqrt(L);
0 commit comments