-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature/reflectivity #341
base: develop
Are you sure you want to change the base?
Feature/reflectivity #341
Changes from all commits
0fc0a0b
afa83a9
918c20d
985c465
0cedd33
0851155
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ struct MultiReturnSamplesPointers | |
Field<IS_HIT_I32>::type* isHit; | ||
Field<DISTANCE_F32>::type* distance; | ||
Field<INTENSITY_F32>::type* intensity; | ||
Field<REFLECTIVITY_F32>::type* reflectivity; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove |
||
Field<LASER_RETRO_F32>::type* laserRetro; | ||
Field<ENTITY_ID_I32>::type* entityId; | ||
Field<ABSOLUTE_VELOCITY_VEC3_F32>::type* absVelocity; | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -127,6 +127,9 @@ __device__ void saveReturnAsHit(const RaytraceRequestContext* ctx, int beamIdx, | |||||||||||||||
static_cast<uint8_t>(std::round(ctx->mrSamples.intensity[sampleIdx])) : | ||||||||||||||||
UINT8_MAX; | ||||||||||||||||
} | ||||||||||||||||
if (ctx->reflectivityF32 != nullptr) { | ||||||||||||||||
ctx->reflectivityF32[returnPointIdx] = ctx->mrSamples.reflectivity[sampleIdx]; | ||||||||||||||||
} | ||||||||||||||||
Comment on lines
+130
to
+132
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you can use selected sample to compute reflectivity. This way reflectivity can be removed from multi-return samples to save memory.
Suggested change
|
||||||||||||||||
if (ctx->entityId != nullptr) { | ||||||||||||||||
ctx->entityId[returnPointIdx] = ctx->mrSamples.entityId[sampleIdx]; | ||||||||||||||||
} | ||||||||||||||||
|
@@ -183,6 +186,9 @@ __device__ void saveReturnAsNonHit(const RaytraceRequestContext* ctx, int firstS | |||||||||||||||
if (ctx->intensityU8 != nullptr) { | ||||||||||||||||
ctx->intensityU8[returnPointIdx] = 0; | ||||||||||||||||
} | ||||||||||||||||
if (ctx->reflectivityF32 != nullptr) { | ||||||||||||||||
ctx->reflectivityF32[returnPointIdx] = 0; | ||||||||||||||||
} | ||||||||||||||||
if (ctx->entityId != nullptr) { | ||||||||||||||||
ctx->entityId[returnPointIdx] = RGL_ENTITY_INVALID_ID; | ||||||||||||||||
} | ||||||||||||||||
|
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.
What's the reason behind this
0.1f
choice?