mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added NoLodVoxels option
This commit is contained in:
parent
39e8b5d468
commit
596ae73117
@ -97,6 +97,11 @@ void main() {
|
|||||||
f_ao = min(f_ao, max(f_norm.z * 0.5 + 0.5, 0.0));
|
f_ao = min(f_ao, max(f_norm.z * 0.5 + 0.5, 0.0));
|
||||||
voxel_norm = mix(my_norm, voxel_norm == vec3(0.0) ? f_norm : voxel_norm, voxelize_factor);
|
voxel_norm = mix(my_norm, voxel_norm == vec3(0.0) ? f_norm : voxel_norm, voxelize_factor);
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_NOLODVOXELS
|
||||||
|
f_ao = 1.0;
|
||||||
|
voxel_norm = normalize(mix(side_norm, top_norm, cam_dir.z));
|
||||||
|
#endif
|
||||||
|
|
||||||
vec3 emitted_light, reflected_light;
|
vec3 emitted_light, reflected_light;
|
||||||
|
|
||||||
// This is a bit of a hack. Because we can't find the volumetric lighting of each particle (they don't talk to the
|
// This is a bit of a hack. Because we can't find the volumetric lighting of each particle (they don't talk to the
|
||||||
|
@ -354,6 +354,11 @@ void main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_NOLODVOXELS
|
||||||
|
f_ao = 1.0;
|
||||||
|
voxel_norm = normalize(mix(side_norm, top_norm, cam_dir.z));
|
||||||
|
#endif
|
||||||
|
|
||||||
// vec3 f_ao_view = max(vec3(dot(f_orig_view_dir.yz, sides.yz), dot(f_orig_view_dir.xz, sides.xz), dot(f_orig_view_dir.xy, sides.xy)), 0.0);
|
// vec3 f_ao_view = max(vec3(dot(f_orig_view_dir.yz, sides.yz), dot(f_orig_view_dir.xz, sides.xz), dot(f_orig_view_dir.xy, sides.xy)), 0.0);
|
||||||
// delta_sides *= sqrt(1.0 - f_ao_view * f_ao_view);
|
// delta_sides *= sqrt(1.0 - f_ao_view * f_ao_view);
|
||||||
// delta_sides *= 1.0 - mix(view_dir / f_ao_view, vec3(0.0), equal(f_ao_view, vec3(0.0)));// sqrt(1.0 - f_ao_view * f_ao_view);
|
// delta_sides *= 1.0 - mix(view_dir / f_ao_view, vec3(0.0), equal(f_ao_view, vec3(0.0)));// sqrt(1.0 - f_ao_view * f_ao_view);
|
||||||
|
@ -463,4 +463,6 @@ pub enum ExperimentalShader {
|
|||||||
BareMinimum,
|
BareMinimum,
|
||||||
/// Lowers strength of the glow effect for lights near the camera.
|
/// Lowers strength of the glow effect for lights near the camera.
|
||||||
LowGlowNearCamera,
|
LowGlowNearCamera,
|
||||||
|
/// Disable the fake voxel effect on LoD features.
|
||||||
|
NoLodVoxels,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user