Implements tree visibility occlusion system.
Adds tree fading based on camera line of sight. Trees now fade out when they obstruct the player's view, improving visibility. Also includes several fixes: - Fixes tree distribution. - Adds a see-through shader. - Adds camera and occlusion scripts.
This commit is contained in:
parent
a1efaf6294
commit
f98773237e
10 changed files with 314 additions and 137 deletions
|
|
@ -14,9 +14,9 @@ void fragment() {
|
|||
// Use world Y position instead of UV
|
||||
float gradient_factor = (world_position.y + gradient_offset) / gradient_height;
|
||||
gradient_factor = clamp(gradient_factor, 0.0, 1.0);
|
||||
|
||||
|
||||
vec3 final_color = mix(base_color.rgb, variation_color.rgb, gradient_factor);
|
||||
|
||||
|
||||
ALBEDO = final_color;
|
||||
ROUGHNESS = 0.8;
|
||||
METALLIC = 0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue