Sampling 1x1 texture vs if statements
Members - Reputation: 281
Posted 28 July 2012 - 10:01 AM
Also does anyone know why sampling a depth texture is so damn slow on ipad 3? its a 768x768 texture that is a static shadow map. As soon as I enabe sampling of it fps drops by at least 10.
Crossbones+ - Reputation: 5965
Posted 28 July 2012 - 11:27 AM
Regarding your first question, I'd be inclined to go with the 1x1 texture as it would give you cleaner code and less state changes. You're not clear however on whether the if statement would happen in a shader or in your C/C++ code so it's difficult to form any kind of overall recommendation.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.