From 96e857276e1f6826e56e4eff89bcd12ea6782930 Mon Sep 17 00:00:00 2001 From: iaomw Date: Sun, 29 Sep 2024 15:14:24 +0800 Subject: [PATCH] fix sphere light gas --- zenovis/xinxinoptix/optixPathTracer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenovis/xinxinoptix/optixPathTracer.cpp b/zenovis/xinxinoptix/optixPathTracer.cpp index 37cb95cfb7..5cbee114f7 100644 --- a/zenovis/xinxinoptix/optixPathTracer.cpp +++ b/zenovis/xinxinoptix/optixPathTracer.cpp @@ -1889,7 +1889,7 @@ static void buildLightSpheresGAS( PathTracerState& state, std::vector& l raii d_vertex_buffer{}; { - auto data_length = sizeof( Vertex ) * sphere_count; + auto data_length = sizeof( float4 ) * sphere_count; CUDA_CHECK( cudaMalloc( reinterpret_cast( &d_vertex_buffer.reset() ), data_length) ); CUDA_CHECK( cudaMemcpy( reinterpret_cast( (CUdeviceptr)d_vertex_buffer ), lightSpheres.data(),