C++着色器矩阵问题
在检查着色器示例时,我最近发现它很常见 使用世界和世界视图投影传递世界逆转置矩阵 矩阵。
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
世界逆转置矩阵通常用于将法线转换为视空间。
The world inverse transpose matrix is often used for transforming normals into viewspace.