Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Comments

Support #[spirv(object_to_world)] and #[spirv(world_to_object)]#734

Closed
hatoo wants to merge 1 commit intoEmbarkStudios:mainfrom
hatoo:raytracing-matrix
Closed

Support #[spirv(object_to_world)] and #[spirv(world_to_object)]#734
hatoo wants to merge 1 commit intoEmbarkStudios:mainfrom
hatoo:raytracing-matrix

Conversation

@hatoo
Copy link
Contributor

@hatoo hatoo commented Aug 21, 2021

Fixes #723 (comment).

This PR supports #[spirv(object_to_world)] and #[spirv(world_to_object)].
This decrares ObjectToWorldKHR/WorldToObjectKHR builtins as OpMatrix type and unpack it to function local variable.

I added SpirvType::Matrix variant but some of the other codes left todo! because I don't know how to test it when implemented.

I've confirmed that it works in my project.

@hatoo hatoo requested review from eddyb and khyperia as code owners August 21, 2021 14:27
@khyperia
Copy link
Contributor

khyperia commented Aug 26, 2021

Hmm. We probably want to implement full support for OpTypeMatrix rather than patch in a conversion, tbh. If we do want to go through this path, though, I'd like the todo!()s to be filled in.

@hatoo
Copy link
Contributor Author

hatoo commented Aug 27, 2021

Ok, I'll try to implement full support for OpTypeMatrix this weekend.

@hatoo
Copy link
Contributor Author

hatoo commented Aug 29, 2021

#738

@hatoo hatoo closed this Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler panics when using #[spirv(object_to_world)]

2 participants