/************************************************** * File: Screen.txt Vertex Shader * * Author: Ben Cohen (01/06/2001) * * Description: Standard 2D vertex shader * *************************************************/ /************************************************* * Constants: * * c0 - constants vector {0,1.0,0.5,256} * c1 - screen offsets {0.53125, 0.53125, 0.03125, 0.0} * c2-c5 - World->screen transformation matrix. * c6 - Light direction * c7 - Directional light colour * c8 - Ambient light Colour * c9-c12 - World view matrix * c13-c15- Inverse world view matrix * c16-c19- Texture transform matrix * * Streams: * v0 - Position vector {x,y,z,rhw} * v1 - Vertex colour * v2 - Texture co-ords {u,v} * ************************************************/ #pragma screenspace #include "Shader_def.h" xvs.1.0 ; set position add oPos, v0, c[CV_SCREEN_CONSTANT] ; Copy vertex colour mov oD0, v1 ; Copy texture co-ords across mov oT0, v2 ;/***************/ ;/* END OF FILE */ ;/***************/