labsyspharm / minerva-author

Tool to create images and configuration files for Minerva-Story
MIT License
15 stars 14 forks source link

Skip rendering when dynamic range is zero #46

Closed jmuhlich closed 2 years ago

jmuhlich commented 2 years ago

When range_min==range_max, the rendering equation divides by zero and the resulting scaled channel image is all NaN. This ends up forcing the entire image to black as the NaNs propagate through the compositing and get turned into zeros when cast to uint8. This change just skips rendering and compositing when the dynamic range is zero.

thejohnhoffer commented 2 years ago

Looks good to me! If nothing is rendered, Minerva Story will display a black tiled image. So, this will not change anything visually for the end user.