diff --git a/src/pbrt/gpu/accel.cpp b/src/pbrt/gpu/accel.cpp index a865af78f8cc1d58fd57dffc1f81f13cfe6f2d8a..fbe8e13ee10dc60581c61e86bac54c6316b61bcc 100644 --- a/src/pbrt/gpu/accel.cpp +++ b/src/pbrt/gpu/accel.cpp @@ -1189,7 +1189,7 @@ void GPUAccel::IntersectShadow(int maxRays, ShadowRayQueue *shadowRayQueue, RayIntersectParameters params; params.traversable = rootTraversable; params.shadowRayQueue = shadowRayQueue; - params.pixelSampleState = pixelSampleState; + params.pixelSampleState = *pixelSampleState; ParamBufferState &pbs = getParamBuffer(params); @@ -1227,7 +1227,7 @@ void GPUAccel::IntersectShadowTr(int maxRays, ShadowRayQueue *shadowRayQueue, RayIntersectParameters params; params.traversable = rootTraversable; params.shadowRayQueue = shadowRayQueue; - params.pixelSampleState = pixelSampleState; + params.pixelSampleState = *pixelSampleState; ParamBufferState &pbs = getParamBuffer(params); diff --git a/src/pbrt/gpu/optix.cu b/src/pbrt/gpu/optix.cu index f17671744e39d9ed609fbb6545947bd8fa5e86a4..031b9ed2b20be9920d7f2591eca72ddff5a94b29 100644 --- a/src/pbrt/gpu/optix.cu +++ b/src/pbrt/gpu/optix.cu @@ -356,8 +356,8 @@ extern "C" __global__ void __raygen__shadow() { sr.uniPathPDF[0], sr.uniPathPDF[1], sr.uniPathPDF[2], sr.uniPathPDF[3], sr.lightPathPDF[0], sr.lightPathPDF[1], sr.lightPathPDF[2], sr.lightPathPDF[3]); - SampledSpectrum Lpixel = params.pixelSampleState->L[sr.pixelIndex]; - params.pixelSampleState->L[sr.pixelIndex] = Lpixel + Ld; + SampledSpectrum Lpixel = params.pixelSampleState.L[sr.pixelIndex]; + params.pixelSampleState.L[sr.pixelIndex] = Lpixel + Ld; } else { PBRT_DBG("Shadow ray was occluded\n"); } @@ -506,8 +506,8 @@ extern "C" __global__ void __raygen__shadow_Tr() { PBRT_DBG("Setting final Ld for shadow ray index %d pixel index %d = as %f %f %f %f\n", index, sr.pixelIndex, Ld[0], Ld[1], Ld[2], Ld[3]); - SampledSpectrum Lpixel = params.pixelSampleState->L[sr.pixelIndex]; - params.pixelSampleState->L[sr.pixelIndex] = Lpixel + Ld; + SampledSpectrum Lpixel = params.pixelSampleState.L[sr.pixelIndex]; + params.pixelSampleState.L[sr.pixelIndex] = Lpixel + Ld; } } diff --git a/src/pbrt/gpu/optix.h b/src/pbrt/gpu/optix.h index f4b8320dbb1305f72ddf532c43b1e2c5cfba0019..7d74b3ca9de2b01366378773c4557f9067d872aa 100644 --- a/src/pbrt/gpu/optix.h +++ b/src/pbrt/gpu/optix.h @@ -61,7 +61,7 @@ struct RayIntersectParameters { // shadow rays ShadowRayQueue *shadowRayQueue; - SOA *pixelSampleState; + SOA pixelSampleState; // Subsurface scattering... SubsurfaceScatterQueue *subsurfaceScatterQueue;