GDShader: What's worse? if statement or texture sample?
GDShader: What's worse? if statement or texture sample?
I have heard many times that if statements in shaders slow down the gpu massively. But I also heard that texture samples are very expensive.
Which one is more endurable? Which one is less impactful?
I am asking, because I need to decide on if I should multiply a value by 0, or put an if statement.
You're viewing a single thread.
View all comments
9
comments
@Smorty don't know for sure but experience tells me to go with mul zero.
3 0 Reply
You've viewed 9 comments.
Scroll to top