⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shadowvolume.vsh

📁 real-time(实时渲染技术DirectX)Media
💻 VSH
字号:
vs.1.1

;Dot product of light vector with normal vector
;and store it in r0.x.
dp3 r0.x, v3, -c4

;Get the vector from the light to the vertex
sub r1, v0, c7

;If r0.x is less than zero, then this vertex is facing away
;from the light. If that's the case, push it farther.
slt r2.x, r0.x, c8.y
mul r2.x, r2.x, c8.x
mad r3, r2.x, r1, v0

;Do the final transformation and emit it in oPos. This
;is completely independent of the lighting operations
dp4 oPos.x, r3, c0
dp4 oPos.y, r3, c1
dp4 oPos.z, r3, c2
dp4 oPos.w, r3, c3


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -