-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Solari radiance cache #20406
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
Solari radiance cache #20406
Conversation
…e when changing LODs)
This is not a blocker for 0.17; moving milestones :) |
let step = max((d * base_size) / 7.0, base_size); | ||
let quantization_factor = exp2(floor(log2(step))); | ||
|
||
return floor(world_position / quantization_factor + 0.0001); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the + 0.0001
meant to stop a div by 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, it goes after the division. It just kinda bugs out without it, not entirely sure why.
} | ||
|
||
fn sample_random_light_ris(world_position: vec3<f32>, world_normal: vec3<f32>, workgroup_id: vec2<u32>, rng: ptr<function, u32>) -> vec3<f32> { | ||
var workgroup_rng = (workgroup_id.x * 5782582u) + workgroup_id.y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have some sort of util function for this...
Also, this should be moved to sampling.wgsl
so we can share it with restir_di.wgsl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe? I haven't decided how I want to unify the RIS stuff yet. For instance this one dosen't use BRDF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Sparky was talking about the hash thing
Objective
Solution
Issues
Showcase