mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Put rainbows behind experimental
This commit is contained in:
@ -247,11 +247,13 @@ vec3 get_cloud_color(vec3 surf_color, vec3 dir, vec3 origin, const float time_of
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
#if (CLOUD_MODE >= CLOUD_MODE_MEDIUM)
|
#if (CLOUD_MODE >= CLOUD_MODE_MEDIUM)
|
||||||
|
#ifdef EXPERIMENTAL_RAINBOWS
|
||||||
// TODO: Make it a double rainbow
|
// TODO: Make it a double rainbow
|
||||||
float rainbow_t = (0.7 - dot(sun_dir.xyz, dir)) * 8 / 0.05;
|
float rainbow_t = (0.7 - dot(sun_dir.xyz, dir)) * 8 / 0.05;
|
||||||
int rainbow_c = int(floor(rainbow_t));
|
int rainbow_c = int(floor(rainbow_t));
|
||||||
rainbow_t = fract(rainbow_t);
|
rainbow_t = fract(rainbow_t);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; cdist > min_dist && i < 250; i ++) {
|
for (i = 0; cdist > min_dist && i < 250; i ++) {
|
||||||
ldist = cdist;
|
ldist = cdist;
|
||||||
@ -287,6 +289,7 @@ vec3 get_cloud_color(vec3 surf_color, vec3 dir, vec3 origin, const float time_of
|
|||||||
|
|
||||||
// Rainbow
|
// Rainbow
|
||||||
#if (CLOUD_MODE >= CLOUD_MODE_MEDIUM)
|
#if (CLOUD_MODE >= CLOUD_MODE_MEDIUM)
|
||||||
|
#ifdef EXPERIMENTAL_RAINBOWS
|
||||||
if (rainbow_c >= 0 && rainbow_c < 8) {
|
if (rainbow_c >= 0 && rainbow_c < 8) {
|
||||||
float rain = rain_density_at(pos.xy);
|
float rain = rain_density_at(pos.xy);
|
||||||
vec3 colors[9] = {
|
vec3 colors[9] = {
|
||||||
@ -307,6 +310,7 @@ vec3 get_cloud_color(vec3 surf_color, vec3 dir, vec3 origin, const float time_of
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef IS_POSTPROCESS
|
#ifdef IS_POSTPROCESS
|
||||||
}
|
}
|
||||||
|
@ -467,6 +467,8 @@ pub enum ExperimentalShader {
|
|||||||
/// Display grid lines to visualize the distribution of shadow map texels
|
/// Display grid lines to visualize the distribution of shadow map texels
|
||||||
/// for the directional light from the sun.
|
/// for the directional light from the sun.
|
||||||
DirectionalShadowMapTexelGrid,
|
DirectionalShadowMapTexelGrid,
|
||||||
// Enable rain, unfinished and goes through blocks
|
/// Enable rain, unfinished and goes through blocks
|
||||||
Rain,
|
Rain,
|
||||||
|
/// Enable rainbows
|
||||||
|
Rainbows,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user