shaped-texture: Clean up code flow a bit

This is easier for me to read.