Difference between revisions of "TEST-STRCMP4CODES"

From SimsWiki
Jump to: navigation, search
(pool1 2)
Line 1: Line 1:
struct InputVertex
+
pass -clipAlways -modifiedEachFrameHint
{
+
#fillmode wireframe
float3 position: POSITION0;
+
alphaBlend srcFactor(srcAlpha) add dstFactor(invSrcAlpha)
float3 normal : NORMAL0;
+
      seti textureLights (numLightsOfType(environmentCube)) 
};
+
      depthTest true -enableDepthWrite false         
+
 
struct OutputVertex
+
shaderProgram -target vertexProgram -method compile -version 1_1
{
+
 
float4 clipPosition : POSITION;
+
bindConstants 0 -bindingID geomToClip -constantCount 4
float4 sPos        : TEXCOORD0;
+
bindConstants 4 -bindingID geomToCamera -constantCount 3
float2 Wave0        : TEXCOORD1;
+
 
              float2 Wave1        : TEXCOORD2;
+
bindConstants 7 -bindingID frameInfo
              float2 Wave2        : TEXCOORD3;
+
 
              float2 Wave3        : TEXCOORD4;
+
bindConstants 11 -bindingID immediateData -data ($wmXRepeat, 0, $wmXWaveHeight, $wmXSpeed)
              float3 Eye          : TEXCOORD5;
+
bindConstants 12 -bindingID immediateData -data (0, $wmYRepeat, $wmYWaveHeight, $wmYSpeed)
              float4 specular    : COLOR0;    
+
 
};
+
# pre-evaluate these
 +
setf xscale (-$wmXRepeat * $wmXWaveHeight)
 +
setf yscale (-$wmYRepeat * $wmYWaveHeight)
 +
bindConstants 13 -bindingID immediateData -data ($xscale,$yscale, 1,0)
 +
bindConstants 14 -bindingID allStandardLightData -constantCount 4 -constantType float
 +
bindConstants 18 -bindingID cameraToGlobal -constantCount 3
 +
bindConstants 21 -bindingID cameraToGeom -constantCount 3
 +
       
 +
        if (tsIsDay)       
 +
            bindConstants 25 -bindingID immediateData -data (0.75, 0.75, 0.75, 1)       
 +
        else
 +
            bindConstants 25 -bindingID immediateData -data (0.2, 0.2, 0.2, 1)       
 +
        endif
 +
 
 +
shaderSource
 +
float4 frameInfo : register(c7);
 +
float4 waveDataX : register(c11);
 +
float4 waveDataY : register(c12);
 +
float4 waveDataHelper : register(c13);
 +
float4x4 clipSpaceMatrix : register(c0);
 +
float4x3 cameraSpaceMatrix : register(c4);
 +
float4x3 cameraToGlobalMatrix : register(c18);
 +
float4x3 cameraToGeomMatrix : register(c21);
 +
            float4 nightColor: register(c25);
 +
float4 lightDirection : register(c14);
 +
float4 lightColor : register(c15);
 +
float4 lightSpecular : register(c16);
 +
const static float4 refractionWeights={1,1,2,0};
 +
const static float4 layerBlue={0.3, 0.7, 1.0, 1};

Revision as of 00:56, 16 June 2009

pass -clipAlways -modifiedEachFrameHint #fillmode wireframe alphaBlend srcFactor(srcAlpha) add dstFactor(invSrcAlpha)

     seti textureLights (numLightsOfType(environmentCube))  
     depthTest true -enableDepthWrite false          
  

shaderProgram -target vertexProgram -method compile -version 1_1

bindConstants 0 -bindingID geomToClip -constantCount 4 bindConstants 4 -bindingID geomToCamera -constantCount 3

bindConstants 7 -bindingID frameInfo

bindConstants 11 -bindingID immediateData -data ($wmXRepeat, 0, $wmXWaveHeight, $wmXSpeed) bindConstants 12 -bindingID immediateData -data (0, $wmYRepeat, $wmYWaveHeight, $wmYSpeed)

# pre-evaluate these setf xscale (-$wmXRepeat * $wmXWaveHeight) setf yscale (-$wmYRepeat * $wmYWaveHeight) bindConstants 13 -bindingID immediateData -data ($xscale,$yscale, 1,0) bindConstants 14 -bindingID allStandardLightData -constantCount 4 -constantType float bindConstants 18 -bindingID cameraToGlobal -constantCount 3 bindConstants 21 -bindingID cameraToGeom -constantCount 3

        if (tsIsDay)         
           bindConstants 25 -bindingID immediateData -data (0.75, 0.75, 0.75, 1)         
        else
           bindConstants 25 -bindingID immediateData -data (0.2, 0.2, 0.2, 1)         
        endif

shaderSource float4 frameInfo : register(c7); float4 waveDataX : register(c11); float4 waveDataY : register(c12); float4 waveDataHelper : register(c13); float4x4 clipSpaceMatrix : register(c0); float4x3 cameraSpaceMatrix : register(c4); float4x3 cameraToGlobalMatrix : register(c18); float4x3 cameraToGeomMatrix : register(c21);

           float4 nightColor: register(c25);

float4 lightDirection : register(c14); float4 lightColor : register(c15); float4 lightSpecular : register(c16); const static float4 refractionWeights={1,1,2,0}; const static float4 layerBlue={0.3, 0.7, 1.0, 1};

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox