renderer: removed useless array comparison
renderer: fixed possible division by zero, refs #688

Prevent division by zero in following ResampleTexture()