Difference between revisions of "TEST-STRCMP4CODES"
From SimsWiki
| Line 1: | Line 1: | ||
| − | + | material | |
| − | + | ||
| − | + | create DetermineHardwareSupport() | |
| − | + | ||
| − | + | if ($causticsEnabled and $useFixedFunctionPath = false and $useSWVertexShaderPath = false) | |
| − | + | ||
| − | + | shader -layer +9999 | |
| − | + | pass | |
| − | + | renderClipSpaceRect | |
| + | renderTarget causticsTile -fixed (64, 64) -allocateDepthBuffer false -undo | ||
| + | create TiledTextureAnimShaderProgramEP3(8 4 1) | ||
| + | |||
| + | alphaBlend srcFactor(one) add dstFactor(zero) | ||
| + | alphaTest false 0 | ||
| + | alphaTestFunction acceptIfGreater | ||
| − | + | depthTest false -enableDepthWrite false | |
| + | depthTestFunction accept | ||
| − | + | stencil false | |
| − | + | ||
| − | + | fillmode $stdMatFillMode | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | float4 | + | shaderProgram -target pixelProgram -method compile -version 1_1 |
| + | shaderSource | ||
| + | sampler caustics; | ||
| + | struct cInputPixel | ||
| + | { | ||
| + | float4 color : COLOR; | ||
| + | float2 tc0 : TEXCOORD0; | ||
| + | }; | ||
| + | float4 PixelMain(cInputPixel pi) : COLOR | ||
| + | { | ||
| + | float4 texColor = tex2D(caustics, pi.tc0); | ||
| + | return texColor*pi.color; | ||
| + | } | ||
| + | endShaderSource | ||
| + | end | ||
| − | + | sampler 0 | |
| − | + | texture causticsTiled | |
| − | + | textureAddressing tile tile | |
| − | + | end | |
| − | + | end | |
| − | + | end | |
| − | + | else | |
| − | + | shader | |
| − | + | ||
| − | + | end | |
| − | + | endif | |
| − | + | end | |
| − | + | enddef | |
| − | + | ||
| − | + | setf causticsStrength 0.8 | |
| − | + | setf causticsBaseStrength 0.5 | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
Revision as of 03:32, 3 September 2007
material
create DetermineHardwareSupport()
if ($causticsEnabled and $useFixedFunctionPath = false and $useSWVertexShaderPath = false)
shader -layer +9999
pass
renderClipSpaceRect
renderTarget causticsTile -fixed (64, 64) -allocateDepthBuffer false -undo
create TiledTextureAnimShaderProgramEP3(8 4 1)
alphaBlend srcFactor(one) add dstFactor(zero)
alphaTest false 0
alphaTestFunction acceptIfGreater
depthTest false -enableDepthWrite false
depthTestFunction accept
stencil false
fillmode $stdMatFillMode
shaderProgram -target pixelProgram -method compile -version 1_1
shaderSource
sampler caustics;
struct cInputPixel
{
float4 color : COLOR;
float2 tc0 : TEXCOORD0;
};
float4 PixelMain(cInputPixel pi) : COLOR
{
float4 texColor = tex2D(caustics, pi.tc0);
return texColor*pi.color;
}
endShaderSource
end
sampler 0
texture causticsTiled
textureAddressing tile tile
end
end
end
else
shader
end
endif
end
enddef
setf causticsStrength 0.8 setf causticsBaseStrength 0.5