Skip to content

Commit

Permalink
fix rtx
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Sep 12, 2023
1 parent 66471dc commit 0d761b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions luisa_compute/examples/path_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const SPP_PER_DISPATCH: u32 = 32u32;

fn main() {
use luisa::*;
init_logger();
init_logger_verbose();

std::env::set_var("WINIT_UNIX_BACKEND", "x11");
let args: Vec<String> = std::env::args().collect();
Expand Down Expand Up @@ -236,7 +236,7 @@ fn main() {
vertex_heap.emplace_buffer_async(index, vertex_buffers.last().unwrap());
index_heap.emplace_buffer_async(index, index_buffers.last().unwrap());
cmds.push(mesh.build_async(AccelBuildRequest::ForceBuild));
accel.push_mesh(&mesh, glam::Mat4::IDENTITY.into(), u32::MAX, true);
accel.push_mesh(&mesh, glam::Mat4::IDENTITY.into(), 255, true);
}
cmds.push(vertex_heap.update_async());
cmds.push(index_heap.update_async());
Expand Down
4 changes: 2 additions & 2 deletions luisa_compute/src/rtx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Accel {
let mut flags =
api::AccelBuildModificationFlags::PRIMITIVE | AccelBuildModificationFlags::TRANSFORM;

flags |= api::AccelBuildModificationFlags::VISIBILITY;
flags |= api::AccelBuildModificationFlags::VISIBILITY | api::AccelBuildModificationFlags::USER_ID;

if opaque {
flags |= api::AccelBuildModificationFlags::OPAQUE_ON;
Expand Down Expand Up @@ -180,7 +180,7 @@ impl Accel {
) {
let mut flags = api::AccelBuildModificationFlags::PRIMITIVE;
dbg!(flags);
flags |= api::AccelBuildModificationFlags::VISIBILITY;
flags |= api::AccelBuildModificationFlags::VISIBILITY | api::AccelBuildModificationFlags::USER_ID;

if opaque {
flags |= api::AccelBuildModificationFlags::OPAQUE_ON;
Expand Down
2 changes: 1 addition & 1 deletion luisa_compute_sys/LuisaCompute

0 comments on commit 0d761b7

Please sign in to comment.