Fix performance issues with transparency example