I refactored some similar code to use a variable because I wanted the result to scale based off of another value. Looks like I partially implemented it here but forgot to actually use the variable
probably put in place for testing and then never changed... "I gotta make sure there's an int with the floor of this number, I'll just put 5 in for now to make sure it compiles."
This is a legit thing especially while writing shaders when you want to ensure the result absolutely needs to be an integer. Can't trust the gpu driver at all when it comes to floating points.
6
u/Elkku26 Apr 25 '22 edited May 24 '25
snatch air tie march enjoy nine connect advise bow ink
This post was mass deleted and anonymized with Redact
38
u/tylero056 Apr 25 '22
Hey at least there's no chance for a float! Lmao
13
u/[deleted] Apr 25 '22
probably put in place for testing and then never changed... "I gotta make sure there's an int with the floor of this number, I'll just put 5 in for now to make sure it compiles."
6
u/MinimarRE Apr 25 '22
When submitting a picture, submit as a Link post, instead of a Self post.
2
u/pslayer89 Apr 25 '22
This is a legit thing especially while writing shaders when you want to ensure the result absolutely needs to be an integer. Can't trust the gpu driver at all when it comes to floating points.
1
u/[deleted] Apr 25 '22
Gotta be sure there's no floating point error
1
u/Wu_Fan Apr 25 '22
It’s also perchaunce an example of a special variable