home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2005 May
/
Gamestar_73_2005-05_dvd.iso
/
Dema
/
IMPERIAL_GLORY
/
data1.cab
/
NewComponent1
/
Data.pak
/
Engine
/
LinearTween.vsh
< prev
next >
Wrap
Text File
|
2005-02-12
|
1KB
|
28 lines
//----------------------------------------------------------------------------------------
// Constantes especificadas por la aplicaci≤n
//----------------------------------------------------------------------------------------
// c0-c3 = world/view/projection matrix
// c4 = diffuse color constant
// c5 = (fWeight1, 1.0 - fWeight, 1.0, 0.0)
//
// Vertex components (as specified in the vertex DECL)
// v0 = Position 1 (stream 1)
// v1 = Position 2 (stream 2)
// v2 = Texcoords (stream 3)
//----------------------------------------------------------------------------------------
// Vertex-Shader interpola 2 posiciones desde 2 streams y aplica transformaci≤n
// e iluminaci≤n constante, y asigna coordenadas de textura desde canal independiente!
//----------------------------------------------------------------------------------------
vs.1.1
dcl_position0 v0 // v0 = Position 1 (stream 1)
dcl_position1 v1 // v1 = Position 2 (stream 2)
dcl_texcoord0 v2 // v2 = Texcoords (stream 3)
mul r0, v0, c5.y // Multiplicamos posicion vertice 1 por (1-fblending)
mad r0, v1, c5.x, r0 // Sumamos a eso posicion vertice 2 por (fblending)
m4x4 oPos, r0, c0 // transform vertices by view/projection matrix
mov oD0.xyzw, c5.zzzz // load constant color
mov oT0.xy, v2 // Copiamos coordenadas de textura
mov oFog, c5.z // Asignamos el factor de niebla