Skip to content

Conversation

@jaladreips
Copy link

It's more correct, probably won't have any functional effect.

I've ran into this when I was increasing the number of miss shaders in the triangle sample.

It's more correct, probably won't have any functional effect.
@jaladreips
Copy link
Author

@microsoft-github-policy-service agree

@alecardoso-tech
Copy link
Contributor

This change is incorrect.
The DispatchRays function is initializing dispatchDesc members. If you assign dispatchDesc->HitGroupTable.StrideInBytes to itself, you're not updating the value to the correct stride.

Plus, consider the comment at the beginning of the function: Since each shader table has only one shader record, the stride is same as the size. This explains why they use the SizeInBytes member.

@jaladreips
Copy link
Author

You're right, my change is incorrect.

However, having the stride equal to SizeInBytes makes the sample break as soon as someone modifies it and adds an additional table entry. That's what happened to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants