0001: // ----------------------------------------------------------------------------
0002: //
0003: // sumie.vsh
0004: //
0005: //    Copyright (c) 2002 imagire takashi (imagire@gmail.com) All Rights Reserved.
0006: //
0007: // ----------------------------------------------------------------------------
0008: //
0009: // ; Hand assembled shader
0010: // vs.1.0
0011: //
0012: // mov oPos, v0
0013: //
0014: // add oT0, v7, c20
0015: // add oT1, v7, c21
0016: // add oT2, v7, c22
0017: // add oT3, v7, c23
0018: 
0019: 
0020: // ----------------------------------------------------------------------------
0021: // Input
0022: // ----------------------------------------------------------------------------
0023: struct appdata : application2vertex {
0024:     float4 Position;
0025:     float2 Texcoord;
0026: };
0027: 
0028: // ----------------------------------------------------------------------------
0029: // Output
0030: // ----------------------------------------------------------------------------
0031: #pragma bind vfconn.Position  = HPOS;
0032: #pragma bind vfconn.Texcoord0 = TEX0;
0033: #pragma bind vfconn.Texcoord1 = TEX1;
0034: #pragma bind vfconn.Texcoord2 = TEX2;
0035: #pragma bind vfconn.Texcoord3 = TEX3;
0036: 
0037: struct vfconn : vertex2fragment {
0038:     float4 Position;
0039:     float2 Texcoord0;
0040:     float2 Texcoord1;
0041:     float2 Texcoord2;
0042:     float2 Texcoord3;
0043: };
0044: // ----------------------------------------------------------------------------
0045: // Vertex Shader Program
0046: // ----------------------------------------------------------------------------
0047: vfconn main(appdata IN
0048:         , uniform float2 const_texcoord0
0049:         , uniform float2 const_texcoord1
0050:         , uniform float2 const_texcoord2
0051:         , uniform float2 const_texcoord3
0052: ) {
0053:     vfconn OUT;
0054: 
0055:     /////////////////////////////////////////////////////////////////////
0056:     // Position
0057:     OUT.Position = IN.Position;       // Just copy input value
0058: 
0059:     /////////////////////////////////////////////////////////////////////
0060:     // Texture
0061:     OUT.Texcoord0 = IN.Texcoord + const_texcoord0;   // Copy constant value
0062:     OUT.Texcoord1 = IN.Texcoord + const_texcoord1;   // Copy constant value
0063:     OUT.Texcoord2 = IN.Texcoord + const_texcoord2;   // Copy constant value
0064:     OUT.Texcoord3 = IN.Texcoord + const_texcoord3;   // Copy constant value
0065: 
0066:     return OUT;
0067: }
0068: