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

📄 simpleobject_texcoord_4_offset.nvv

📁 游戏编程精华02-含有几十个游戏编程例子
💻 NVV
字号:
/*********************************************************************NVMH2****
Path:  C:\Dev\devrel\Nv_sdk_4\Dx8\NVEffectsBrowser\Effects\CA_Fire
File:  SimpleObject_TexCoord_4_Offset.nvv

Copyright (C) 1999, 2000 NVIDIA Corporation
This file is provided without support, instruction, or implied warranty of any
kind.  NVIDIA makes no guarantee of its fitness for a particular purpose and is
not liable under any circumstances for any damages or loss whatsoever arising
from the use or inability to use this file or items derived from it.

Comments:


******************************************************************************/


#include "Constants.h"

vs.1.1

#define IN_POS      v0
#define IN_NRM      v1
#define IN_DIFFUSE  v2
#define IN_TC0      v3



// Transform vertex-position to clip-space
dp4 oPos.x, IN_POS, c[CV_WORLDVIEWPROJ_0]
dp4 oPos.y, IN_POS, c[CV_WORLDVIEWPROJ_1]
dp4 oPos.z, IN_POS, c[CV_WORLDVIEWPROJ_2]
dp4 oPos.w, IN_POS, c[CV_WORLDVIEWPROJ_3]


// c[CV_CONSTS_1]
// x = 0
// y = 0.5
// z = 1
// w = 2.0f


// If you want to distort the texture coordinate
//   offsets by multiplying them, set r0 here to 
//   the multiplication factor, otherwise set it
//   to 1.0

mov r0, c[CV_CONSTS_1].z


// Read which set of offsets to use
mov a0.x, c[CV_UV_OFFSET_TO_USE].x


// copy uv-coordinates to all four texture stages
//   and offset them according to the offsets indexed
//   by a0 and the _BASE value for each set of offsets.

mad oT0, r0, c[a0.x + CV_T0_BASE], IN_TC0
mad oT1, r0, c[a0.x + CV_T1_BASE], IN_TC0 
mad oT2, r0, c[a0.x + CV_T2_BASE], IN_TC0 
mad oT3, r0, c[a0.x + CV_T3_BASE], IN_TC0

mov oD0, IN_DIFFUSE

⌨️ 快捷键说明

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