Skip to content

Commit

Permalink
Merge pull request #2994 from MoritzBrueckner/fix-cloud-inf
Browse files Browse the repository at this point in the history
Fix INF values in cloud shader (causing bloom flickering)
  • Loading branch information
luboslenco authored Feb 1, 2024
2 parents c8a14cf + 92af754 commit c2d6f8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions blender/arm/make_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ def frag_write_clouds(world: bpy.types.World, frag: Shader):
frag.add_const('float', 'cloudsSteps', str(round(world.arm_clouds_steps * 100) / 100))

frag.add_function('''float remap(float old_val, float old_min, float old_max, float new_min, float new_max) {
\tif (old_max == old_min) return 0.0;
\treturn new_min + (((old_val - old_min) / (old_max - old_min)) * (new_max - new_min));
}''')

Expand Down

0 comments on commit c2d6f8e

Please sign in to comment.