Skip to content
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

Add MTLAccelerationStructureUserIDInstanceDescriptor #259

Merged
merged 1 commit into from
Mar 12, 2023
Merged

Conversation

kvark
Copy link
Member

@kvark kvark commented Mar 12, 2023

Fairly straightforward.

Corresponding piece of "MTLAccelerationStructure.h":

typedef struct {
    /**
     * @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
     */
    MTLPackedFloat4x3 transformationMatrix;

    /**
     * @brief Instance options
     */
    MTLAccelerationStructureInstanceOptions options;

    /**
     * @brief Instance mask used to ignore geometry during ray tracing
     */
    uint32_t mask;

    /**
     * @brief Used to index into intersection function tables
     */
    uint32_t intersectionFunctionTableOffset;

    /**
     * @brief Acceleration structure index to use for this instance
     */
    uint32_t accelerationStructureIndex;

    /**
     * @brief User-assigned instance ID to help identify this instance in an
     * application-defined way
     */
    uint32_t userID;
} MTLAccelerationStructureUserIDInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0));

@kvark kvark enabled auto-merge (rebase) March 12, 2023 22:35
@kvark kvark merged commit a6101fc into gfx-rs:master Mar 12, 2023
@kvark kvark deleted the rt branch March 12, 2023 22:36
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.

1 participant