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

📄 luminanceblit.nvp

📁 游戏编程精华02-含有几十个游戏编程例子
💻 NVP
字号:
/************************************************************************
LuminanceBlit.nvp

This pixel shader samples the first texture stage only and converts 
the color-value obtained into a luminance-value.

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

; Declare pixel shader version
ps.1.1

; declare constants:
def c1, 0.3f, 0.59f, 0.11f, 0.0f    ; luminance conversion constant

; get color from first texture stage only
tex t0

; convert color to luminance and output
dp3    r0.rgba, t0, c1		

⌨️ 快捷键说明

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