Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Const everything in shaders? Practicality, readability, consistency

$
0
0

Hi,

Curious/want advice what other GPU devs perspectives are on spamming const in front of every variable in shader code or what guideline you follow? I'm on a new team and we have different opinions on this, but I find it hard to reason about it since it is partly a style thing and I see the style of this being a mixed bag in our org code, depending on a team. It's also not discussed in our org coding guidelines.

Some folks on my team believe in putting const in front of every single variable that …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>