home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2005 April
/
Gamestar_72_2005-04_dvd.iso
/
Dema
/
Liquidator
/
Liquidator.tma
/
data
/
renderer
/
default.fx
< prev
next >
Wrap
Text File
|
2004-12-08
|
5KB
|
195 lines
/*
Macro to set proper color ops. for texture stage
*/
#define InitTextureStage( Stage ) \
ColorOp[Stage] = Disable;\
ColorArg1[Stage] = Texture;\
ColorArg2[Stage] = Diffuse;\
ColorArg0[Stage] = Current;\
AlphaOp[Stage] = Disable;\
AlphaArg1[Stage] = Texture;\
AlphaArg2[Stage] = Diffuse;\
AlphaArg0[Stage] = Current;\
BumpEnvLScale[Stage] = 0.0f;\
BumpEnvLOffset[Stage] = 0.0f;\
BumpEnvMat00[Stage] = 0.0f;\
BumpEnvMat01[Stage] = 0.0f;\
BumpEnvMat10[Stage] = 0.0f;\
BumpEnvMat11[Stage] = 0.0f;\
ResultArg[Stage] = Current;\
TexCoordIndex[Stage] = Stage;\
TextureTransformFlags[Stage] = 0;\
Constant[Stage] = 0 \
/*
Macro to set proper sampler ops. for sampler stage
*/
#define InitSamplerStage( Stage ) \
AddressU[Stage] = Wrap;\
AddressV[Stage] = Wrap;\
AddressW[Stage] = Wrap;\
BorderColor[Stage] = float4(0,0,0,0);\
MinFilter[Stage] = Linear;\
MagFilter[Stage] = Linear;\
MipFilter[Stage] = Linear;\
MipMapLodBias[Stage] = 0.0f;\
MaxMipLevel[Stage] = 0;\
MaxAnisotropy[Stage] = 1;\
SRGBTexture[Stage] = 0;\
ElementIndex[Stage] = 0;\
Texture[Stage] = null \
////////////////////////// Default technique, which initilizes all texture and renderstates ///
technique InitTech <
string ScriptClass = "scene";
string Script = "Pass=p0;";
> {
pass p0 < string Script = "Draw=;"; >
{
ZEnable = true;
ZWriteEnable = true;
AlphaTestEnable = false;
LastPixel = true;
DitherEnable = true;
AlphaBlendEnable = false;
FogEnable = false;
SpecularEnable = false;
RangeFogEnable = false;
StencilEnable = false;
Clipping = false;
Lighting = false;
ColorVertex = false;
LocalViewer = false;
NormalizeNormals = false;
PointSpriteEnable = false;
PointScaleEnable = false;
MultiSampleAntialias = true;
IndexedVertexBlendEnable = false;
SrgbWriteEnable = false;
SeparateAlphablendEnable = false;
ScissorTestEnable = false;
AntialiasedLineEnable = false;
EnableAdaptiveTessellation = false;
TwoSidedStencilMode = false;
FillMode = solid;
ShadeMode = gouraud;
BlendOp = add;
BlendOpAlpha = add;
SrcBlend = srccolor;
DestBlend = destcolor;
SrcBlendAlpha = SrcAlpha;
DestBlendAlpha = DestAlpha;
CullMode = ccw;
ZFunc = lessequal;
AlphaRef = 0;
AlphaFunc = greater;
FogColor = 0xff000000;
FogTableMode = none;
FogStart = 0;
FogEnd = 1;
FogDensity = 1;
StencilFail = keep;
StencilZFail = keep;
StencilPass = keep;
StencilFunc = always;
Ccw_StencilFail = keep;
Ccw_StencilZFail = keep;
Ccw_StencilPass = keep;
Ccw_StencilFunc = always;
StencilRef = 0;
StencilMask = 0xffffffff;
StencilWriteMask = 0xffffffff;
TextureFactor = 0xffffffff;
Wrap0 = 0;
Wrap1 = 0;
Wrap2 = 0;
Wrap3 = 0;
Wrap4 = 0;
Wrap5 = 0;
Wrap6 = 0;
Wrap7 = 0;
Wrap8 = 0;
Wrap9 = 0;
Wrap10 = 0;
Wrap11 = 0;
Wrap12 = 0;
Wrap13 = 0;
Wrap14 = 0;
Wrap15 = 0;
Ambient = 0;
FogVertexMode = none;
DiffuseMaterialSource = color1;
SpecularMaterialSource = color2;
AmbientMaterialSource = color2;
EmissiveMaterialSource = material;
VertexBlend = disable;
ClipPlaneEnable = 0;
PointSize = 1.0f;
PointSize_Min = 0.0f;
PointScale_A = 1.0f;
PointScale_B = 0.0f;
PointScale_C = 0.0f;
MultiSampleMask = 0xffffffff;
PointSize_Max = 64.0f;
ColorWriteEnable = RED|GREEN|BLUE;
TweenFactor = 0;
DepthBias = 0.0f;
SlopeScaleDepthBias = 0.0f;
ColorWriteEnable1 = 0x0000000f;
ColorWriteEnable2 = 0x0000000f;
ColorWriteEnable3 = 0x0000000f;
BlendFactor = 0xffffffff;
PatchEdgeStyle = Discrete;
PositionDegree = Cubic;
NormalDegree = Linear;
MinTessellationLevel = 1.0f;
MaxTessellationLevel = 1.0f;
AdaptiveTess_x = 0.0f;
AdaptiveTess_y = 0.0f;
AdaptiveTess_z = 0.0f;
AdaptiveTess_w = 0.0f;
// init default color operations for fixed function pipeline
InitTextureStage(0);
InitTextureStage(1);
InitTextureStage(2);
InitTextureStage(3);
InitTextureStage(4);
InitTextureStage(5);
InitTextureStage(6);
InitTextureStage(7);
// init default sampler states
InitSamplerStage(0);
InitSamplerStage(1);
InitSamplerStage(2);
InitSamplerStage(3);
InitSamplerStage(4);
InitSamplerStage(5);
InitSamplerStage(6);
InitSamplerStage(7);
InitSamplerStage(8);
InitSamplerStage(9);
InitSamplerStage(10);
InitSamplerStage(11);
InitSamplerStage(12);
InitSamplerStage(13);
InitSamplerStage(14);
InitSamplerStage(15);
InitSamplerStage(16);
VertexShader = null;
PixelShader = null;
}
}