tetrahedronnodoflookup.nvp

来自「游戏编程精华02-含有几十个游戏编程例子」· NVP 代码 · 共 24 行

NVP
24
字号
/************************************************************************
TetrahedronNoDoFLookup.nvp

Same as Tetrahedron.nvp, except no Depth-Of-Field look-up occurs. Instead
we push the distance through so we can visualize distance to camera.

Copyright (C) 1999, 2000 NVIDIA Corporation
*************************************************************************/

ps.1.1

def c0, 1.0f, 0.0f, 0.0f, 0.0f

tex t0          ; get color from first texture stage
texcoord t1     ; t1 holds the circle-of-confusion interpolator look-up (in r)

; select the r (x) component, replicate it across all channels, and 
; store the proper circle-of-confusion interpolator in dest alpha!
dp3_sat r0.rgba, t1, c0 

; finally, modulate the current diffuse color with the texture to the output
mul_sat r0.rgb, t0, v0

⌨️ 快捷键说明

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