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

Possible future proofing for raytracing #78

Open
Nielsbishere opened this issue Oct 7, 2021 · 0 comments
Open

Possible future proofing for raytracing #78

Nielsbishere opened this issue Oct 7, 2021 · 0 comments

Comments

@Nielsbishere
Copy link

There are a few things I think would be great if they gained bigger types, such as instanceId and mask. I understand that the packing rules don't allow for any extra bits, but it would still be great if this could maybe be added as an extension that allows these bigger types.
The current limit is; only 8 different masks are allowed and up to 16M instances can be used. Even though right now we might question why 16M instances are needed, it could be useful in the future. The 8 bit mask already is quite limiting as things like layers might have to use separate flags and these use more than 8 bits (up to 24 bits). If this can't be fixed by enlarging the mask, perhaps it could be flagged as a flag. This way you can specify 1 << x instead of x, giving you up to [0, 1 << 255; or 1 << 32 due to integer limits] instead of [0, 255]. Since trace ray already uses a uint (since HLSL doesn't know byte as a primitive), nothing on the shader side would have to be changed. Only a flag on DirectX's and the driver's side that should be checked and convert the stored 8-bits with 1 << x and compares with the mask shot by the ray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant