Sunday 2 November 2008

Expensive state changes

Everytime you want a primitive to be multi-sampled - in order to convert its alpha values into coverage patterns - you are supposed to explicitly ask for it by enabling GL_SAMPLE_ALPHA_TO_COVERAGE.

I thought that keeping this feature enabled for non-translucent primitives was a waste. I was wrong! It's continuosly changing this state that cuts down performances!

Therefore, you're going to prefer to let alpha2coverage enabled whereas supported, and enjoy the terrific boost of performances.

2 comments:

Ale said...

Yep, in OGL the state change is a bottleneck, try to reduce them wherever it's possible.

Unknown said...

it is stunning to see how much performances are influenced by this! Oo"