Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

if-else in shaders: is it really bad?

$
0
0

@GeonBit wrote:

I wrote couple of effects as an experiment that has some if-else statements in them. I remember reading in the past that this is really bad for performance and if-else should be avoided.

My question is, before I butcher my effects and invest 1-2 hours in splitting them into techniques - does it really worth it?
Should I invest the time in breaking it into lots of different techniques and select the right one, or is it something that is no longer relevant and if-else are safe to use?

Also is there a performance difference between if-else and using the question mark operator?

Thanks!

Posts: 4

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles