// // Generated by Microsoft (R) D3DX9 Shader Compiler 4.09.00.1126 // // fxc OceanWaterSparkle_ps11.fx /T vs_1_1 /E VS /Fc // ..\DX9\VSOceanWaterSparkle.vsh // // // Parameters: // // float3 f3FogValues; // float4 f4AmbientColor; // float fTime; // float fWaterTexScale; // float4x4 mtxWorldViewProj; // // // Registers: // // Name Reg Size // ---------------- ----- ---- // mtxWorldViewProj c0 4 // fTime c4 1 // f3FogValues c5 1 // f4AmbientColor c6 1 // fWaterTexScale c7 1 // // Compiled from the code: //------------------------------------------------------------------------------------------------ // VERTEX OUTPUT FORMAT //------------------------------------------------------------------------------------------------ // // struct VS_OUTPUT // { // float4 f4Pos : POSITION; // float2 f2ColorTexCoords : TEXCOORD0; // float2 f2ColorTexCoords2 : TEXCOORD1; // float3 f3ModulateColor : COLOR0; // float fFog : FOG; // }; // //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // VERTEX SHADER //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // VS_OUTPUT VS( float3 InPos : POSITION, float2 f2Tex : TEXCOORD, float4 f4Color : COLOR ) // { // VS_OUTPUT Out = (VS_OUTPUT)0; // // // Transform the vertex into screen space // Out.f4Pos = mul( float4( InPos, 1 ), mtxWorldViewProj ); // // // // JEROME - Change the 30.0f below to bigger numbers to slow down the scrolling. Smaller values will speed it up. // Out.f2ColorTexCoords.x = fWaterTexScale * f2Tex.x + (fTime % 75.0f)/75.0f; // Out.f2ColorTexCoords.y = fWaterTexScale * f2Tex.y; // // Out.f2ColorTexCoords2.x = fWaterTexScale * (1.0f - f2Tex.x); // Out.f2ColorTexCoords2.y = fWaterTexScale * (1.0f - f2Tex.y) - (fTime % 45.0f)/45.0f; // // // Compute the fog values // Out.fFog = saturate( ((Out.f4Pos.z / f3FogValues.x) - f3FogValues.y) / f3FogValues.z ); // // // Compute the modulation color (scale the ambient - we're not going to have any diffuse lighting) // Out.f3ModulateColor = saturate( f4AmbientColor * 3.5 ); // // return Out; // } vs_1_1 def c8, 1, 75, 45, 0 def c9, 150, 90, -75, -45 def c10, 0.0133333, 0.0222222, 3.5, 0 dcl_position v0 dcl_texcoord v1 mov r0.w, c4.x mul r0.xy, r0.w, c8.yzzw sge r1.xy, r0, -r0 mov r0.xyz, v0 mad r1.xy, r1, c9, c9.zwzw mov r0.w, c8.x rcp r2.x, r1.x rcp r2.y, r1.y dp4 oPos.x, r0, c0 mul r2.xy, r2, c4.x dp4 oPos.y, r0, c1 frc r2.xy, r2 dp4 oPos.w, r0, c3 mul r1.xy, r1, r2 dp4 r2.y, r0, c2 mul r1.xy, r1, c10 mad oT0.x, c7.x, v1.x, r1.x add r0.xy, -v1, c8.x mul oT0.y, v1.y, c7.x mul oT1.x, r0.x, c7.x mad oT1.y, c7.x, r0.y, -r1.y rcp r0.x, c5.x rcp r0.y, c5.z mad r0.w, r2.y, r0.x, -c5.y mov oPos.z, r2.y mul r0.w, r0.y, r0.w mov r0.y, c10.z mul r0.xyz, r0.y, c6 max r0.w, r0.w, c8.w max r0.xyz, r0, c8.w min oFog, r0.w, c8.x min oD0.xyz, r0, c8.x // approximately 34 instruction slots used