Never mind, it seems that some rogue alpha layers were causing the weird things I was seeing. So the code above seems good to go.
Never mind, it seems that some rogue alpha layers were causing the weird things I was seeing. So the code above seems good to go.