Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is (GI & 011) == 0 mean... #7

Open
ignarmezh opened this issue Nov 4, 2024 · 1 comment
Open

What is (GI & 011) == 0 mean... #7

ignarmezh opened this issue Nov 4, 2024 · 1 comment
Assignees
Labels

Comments

@ignarmezh
Copy link

ignarmezh commented Nov 4, 2024

Hi!
Sorry for the easiest question, but I don't understand what does if ((GI & 011) == 0) mean in your Assets/MiniEngineAO/Shaders/Downsample1.compute.
011 is octal number? Could we write this with decimal numbers?
Thanks!

@Invertex
Copy link

Invertex commented Nov 4, 2024

Yes, it's an Octal-Literal, since it starts with a zero and no x afterwards.

https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf (Page 13)

It may be a slight performance optimization, but I would wager it doesn't make a difference if you used an integer instead... It would be interesting to hear what @keijiro has to say about it.

But in the meantime, you can always just change it to the uint value and see if it makes any difference to the result and performance! :)

@keijiro keijiro self-assigned this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants