Comments (4)
因为我们最终得到的应该是世界空间的点坐标,这个坐标很明显的特征就是它的w分量应该是1。而代码在从H得到D的过程中是不会保证w分量为1的,所以最后需要除以w分量保证它是一个有效的点坐标。
from unity_shaders_book.
多谢作者的解答,我想我应该明白了。:)
from unity_shaders_book.
作者您好:
关于这一节能否接着问个问题 :
Matrix4x4 currentViewProjectionMatrix = camera.projectionMatrix * camera.worldToCameraMatrix;书中代码中得到的是当前帧的视角*投影矩阵(VP矩阵)。因为变换的结果是依赖于变换顺序的。想请问下这个相乘顺序能麻烦作者给解释下。 看你第四章说我们使用的是列矩阵,因此阅读顺序是从右到左不是很明白。
from unity_shaders_book.
@vipshenji 你好,你可以再仔细阅读一下第4章的相关内容,在纸上做一下练习题,仍然不懂的话欢迎再来更详细地提问 :)
from unity_shaders_book.
Related Issues (20)
- 随书附赠的代码勘误-Chapter9 Unity阴影-Shadow.shader HOT 2
- Github提供的第四章勘误中 4.6.7 的不等式沒有修改
- 散射是否改变光线颜色的问题 HOT 2
- 一直clone失败 有小伙伴遇到一样问题吗 HOT 4
- P43 第四段是不是应该为图4.9(图3.9)
- 第8章 8.7 双面渲染的透明效果 p176 p177 背面法线方向问题
- 12.4 高斯模糊里的纹理采样按照for循环来进行采样好像会有一个纹理坐标用不上 HOT 2
- P146页的问题
- 第二章 2.3.3 裁剪 内容和后面有点矛盾 HOT 2
- Unity2020.3在立方体纹理实现的反射效果 中处理光照衰减之后有奇怪的阴影 HOT 2
- P232这里的uv坐标直接用减法会为负吗? HOT 2
- P92,投影空间问题 HOT 2
- 7.2.2.1在切线空间下计算从模型到切线空间的变换矩阵 HOT 1
- 10.1.15 菲涅尔反射文章《Everything has Fresnel》,链接失效.
- 第十一章中 Billboard 的 Shader 代码是不对的 HOT 5
- 刚打开项目的时候物体偏暗,添加一个物体后就正常了这是为啥?
- 关于12.6节动态模糊,accumulateTexture变量的问题 HOT 2
- 这块应该是减小吧 HOT 2
- 第七章关于法线贴图反映射的计算
- P56 第四章pdf中练习题第三题 应为“是多少” HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity_shaders_book.