C++着色器矩阵问题

发布于 2024-09-29 19:31:01 字数 270 浏览 0 评论 0原文

在检查着色器示例时,我最近发现它很常见 使用世界世界视图投影传递世界逆转置矩阵 矩阵。

float4x4 worldMatrix;
float4x4 worldViewProjectionMatrix;
float4x4 worldInverseTransposeMatrix;

不幸的是,我无法理解它的用途以及它的用途。有人可以解释一下吗?

谢谢。

While examining shader examples I recently found that it's pretty often
to pass the world inverse transpose matrix with the world and world-view-projection
matrices.

float4x4 worldMatrix;
float4x4 worldViewProjectionMatrix;
float4x4 worldInverseTransposeMatrix;

Unfortunately, I couldn't understand the purpose of that and where it can be used. Could someone explain that?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾`听者〃 2024-10-06 19:31:01

世界逆转置矩阵通常用于将法线转换为视空间。

The world inverse transpose matrix is often used for transforming normals into viewspace.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文