Template:Shader Semantics: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Moved field to match the "section")
m (Changed vars to PascalCase)
 
Line 1: Line 1:
HLSL fields are '''case-insensitive'''
<syntaxhighlight lang="hlsl">
<syntaxhighlight lang="hlsl">
int ZENABLE;
int zEnable;
int FILLMODE;
int FillMode;
int SHADEMODE;
int ShadeMode;
int ZWRITEENABLE;
int zWriteEnable;
int ALPHATESTENABLE;
int LastPixel;
int LASTPIXEL;
int SrcBlend;
int SRCBLEND;
int DestBlend;
int DESTBLEND;
int CullMode;
int CULLMODE;
int zFunc;
int ZFUNC;
int DitherEnable;
int ALPHAREF;
int SpecularEnable;
int ALPHAFUNC;
int DITHERENABLE;
int ALPHABLENDENABLE;
int FOGENABLE;
int SPECULARENABLE;
float4 FOGCOLOR; // float4 or dword
int FOGTABLEMODE;
float FOGSTART; // float or int
float FOGEND; // float or int
float FOGDENSITY; // float or int
int RANGEFOGENABLE;
int STENCILENABLE;
int STENCILFAIL;
int STENCILZFAIL;
int STENCILPASS;
int STENCILFUNC;
int STENCILREF;
int STENCILMASK;
int STENCILWRITEMASK;
float4 TEXTUREFACTOR; // float4 or dword


int WRAP0;
int AlphaRef;
int WRAP1;
int AlphaFunc;
int WRAP2;
int AlphaBlendEnable;
int WRAP3;
int AlphaTestEnable;
int WRAP4;
int WRAP5;
int WRAP6;
int WRAP7;
int WRAP8;
int WRAP9;
int WRAP10;
int WRAP11;
int WRAP12;
int WRAP13;
int WRAP14;
int WRAP15;


int CLIPPING;
int FogEnable;
int LIGHTING;
float4 FogColor; // float4 or dword
float4 AMBIENT; // float4 or dword
int FogTableMode;
int FOGVERTEXMODE;
float FogStart; // float or int
int COLORVERTEX;
float FogEnd; // float or int
int LOCALVIEWER;
float FogDensity; // float or int
int NORMALIZENORMALS;
int RangeFogEnable;
int DIFFUSEMATERIALSOURCE;
 
int SPECULARMATERIALSOURCE;
int StencilEnable;
int AMBIENTMATERIALSOURCE;
int StencilFAIL;
int EMISSIVEMATERIALSOURCE;
int StencilZFail;
int VERTEXBLEND;
int StencilPass;
int CLIPPLANEENABLE;
int StencilFunc;
float POINTSIZE; // float or int
int StencilRef;
float POINTSIZE_MIN; // float or int
int StencilMask;
int POINTSPRITEENABLE;
int StencilWriteMask;
int POINTSCALEENABLE;
 
float POINTSCALE_A; // float or int
float4 TextureFactor; // float4 or dword
float POINTSCALE_B; // float or int
 
float POINTSCALE_C; // float or int
int Wrap0;
int MULTISAMPLEANTIALIAS;
int Wrap1;
int MULTISAMPLEMASK;
int Wrap2;
int PATCHEDGESTYLE;
int Wrap3;
int DEBUGMONITORTOKEN;
int Wrap4;
float POINTSIZE_MAX; // float or int
int Wrap5;
int INDEXEDVERTEXBLENDENABLE;
int Wrap6;
int COLORWRITEENABLE;
int Wrap7;
float TWEENFACTOR; // float or int
int Wrap8;
int BLENDOP;
int Wrap9;
int POSITIONDEGREE;
int Wrap10;
int NORMALDEGREE;
int Wrap11;
int SCISSORTESTENABLE;
int Wrap12;
int SLOPESCALEDEPTHBIAS;
int Wrap13;
int ANTIALIASEDLINEENABLE;
int Wrap14;
int MINTESSELLATIONLEVEL;
int Wrap15;
int MAXTESSELLATIONLEVEL;
 
int ADAPTIVETESS_X;
int Clipping;
int ADAPTIVETESS_Y;
int Lighting;
int ADAPTIVETESS_Z;
float4 Ambient; // float4 or dword
int ADAPTIVETESS_W;
int FogVertexMode;
int ENABLEADAPTIVETESSELLATION;
int ColorVertex;
int TWOSIDEDSTENCILMODE;
int LocalViewer;
int CCW_STENCILFAIL;
int NormalizeNormals;
int CCW_STENCILZFAIL;
int DiffuseMaterialSource;
int CCW_STENCILPASS;
int SpecularMaterialSource;
int CCW_STENCILFUNC;
int AmbientMaterialSource;
int COLORWRITEENABLE1;
int EmissiveMaterialSource;
int COLORWRITEENABLE2;
 
int COLORWRITEENABLE3;
int VertexBlend;
float4 BLENDFACTOR; // float4 or dword
int ClipPlaneEnable;
int SRGBWRITEENABLE;
float PointSize; // float or int
int DEPTHBIAS;
float PointSize_MIN; // float or int
int SEPARATEALPHABLENDENABLE;
float PointSize_MAX; // float or int
int SRCBLENDALPHA;
int PointSPRITEENABLE;
int DESTBLENDALPHA;
int PointScaleEnable;
int BLENDOPALPHA;
float PointScale_A; // float or int
int COLOROP;
float PointScale_B; // float or int
int COLORARG1;
float PointScale_C; // float or int
int COLORARG2;
 
int ALPHAOP;
int MultisampleAntiAlias;
int ALPHAARG1;
int MultisampleMask;
int ALPHAARG2;
int PatchedGestyle;
int BUMPENVMAT00;
int DebugMonitorToken;
int BUMPENVMAT01;
int IndexedVertexBlendEnable;
int BUMPENVMAT10;
int ColorWriteEnable;
int BUMPENVMAT11;
float TweenFactor; // float or int
int TEXCOORDINDEX;
int BlendOp;
int BUMPENVLSCALE;
int PositionDegree;
int BUMPENVLOFFSET;
int NormalDegree;
int TEXTURETRANSFORMFLAGS;
int ScissorTestEnable;
int COLORARG0;
int SlopeScaleDepthBias;
int ALPHAARG0;
int AntiAliasedLineEnable;
int RESULTARG;
 
int CONSTANT;
int EnableAdaptiveTessellation;
int ADDRESSU;
int MinTessellationLevel;
int ADDRESSV;
int MaxTessellationLevel;
int ADDRESSW;
int AdaptiveTess_X;
float4 BORDERCOLOR; // float4 or dword
int AdaptiveTess_Y;
int MAGFILTER;
int AdaptiveTess_Z;
int MINFILTER;
int AdaptiveTess_W;
int MIPFILTER;
 
int MIPMAPLODBIAS;
int TwoSidedStencilMode;
int MAXMIPLEVEL;
int CCW_StencilFail;
int MAXANISOTROPY;
int CCW_StencilZFail;
int SRGBTEXTURE;
int CCW_StencilPass;
int ELEMENTINDEX;
int CCW_StencilFunc;
int DMAPOFFSET;
 
int ColorWriteEnable1;
int ColorWriteEnable2;
int ColorWriteEnable3;
float4 BlendFactor; // float4 or dword
int SRGBWriteEnable;
int DepthBias;
int SeparateAlphaBlendEnable;
int SrcBlendAlpha;
int DestBlendAlpha;
int BlendOpAlpha;
 
int ColorOp;
int ColorArg0;
int ColorArg1;
int ColorArg2;
 
int AlphaOp;
int AlphaArg0;
int AlphaArg1;
int AlphaArg2;
 
int BumpEnvMat00;
int BumpEnvMat01;
int BumpEnvMat10;
int BumpEnvMat11;
int TexCoordIndex;
int BumpEnvLScale;
int BumpEnvLOffset;
int TextureTransformFlags;
int ResultArg;
int Constant;
int AddressU;
int AddressV;
int AddressW;
float4 BorderColor; // float4 or dword
int MagFilter;
int MinFilter;
int MipFilter;
int MipMapLODBias;
int MaxMipLevel;
int MaxAnisotropy;
int SRGBTexture;
int ElementIndex;
int DMapOffset;
float4 Diffuse;
float4 Diffuse;
float4 Ambient;
float4 Ambient;
Line 141: Line 154:
float4 Emissive;
float4 Emissive;
float Power;
float Power;
float4x4 VIEW;
float4x4 View;
float4x4 PROJECTION;
float4x4 Projection;
float4x4 TEXTURE0;
 
float4x4 TEXTURE1;
float4x4 Texture0;
float4x4 TEXTURE2;
float4x4 Texture1;
float4x4 TEXTURE3;
float4x4 Texture2;
float4x4 TEXTURE4;
float4x4 Texture3;
float4x4 TEXTURE5;
float4x4 Texture4;
float4x4 TEXTURE6;
float4x4 Texture5;
float4x4 TEXTURE7;
float4x4 Texture6;
float4x4 WORLD;
float4x4 Texture7;
float4x4 WORLD1;
 
float4x4 WORLD2;
float4x4 World;
float4x4 WORLD3;
float4x4 World1;
float4x4 World2;
float4x4 World3;
 
int Type;
int Type;
float4 Diffuse;
float4 Diffuse;

Latest revision as of 17:54, 8 April 2023

HLSL fields are case-insensitive

int zEnable;
int FillMode;
int ShadeMode;
int zWriteEnable;
int LastPixel;
int SrcBlend;
int DestBlend;
int CullMode;
int zFunc;
int DitherEnable;
int SpecularEnable;

int AlphaRef;
int AlphaFunc;
int AlphaBlendEnable;
int AlphaTestEnable;

int FogEnable;
float4 FogColor; // float4 or dword
int FogTableMode;
float FogStart; // float or int
float FogEnd; // float or int
float FogDensity; // float or int
int RangeFogEnable;

int StencilEnable;
int StencilFAIL;
int StencilZFail;
int StencilPass;
int StencilFunc;
int StencilRef;
int StencilMask;
int StencilWriteMask;

float4 TextureFactor; // float4 or dword

int Wrap0;
int Wrap1;
int Wrap2;
int Wrap3;
int Wrap4;
int Wrap5;
int Wrap6;
int Wrap7;
int Wrap8;
int Wrap9;
int Wrap10;
int Wrap11;
int Wrap12;
int Wrap13;
int Wrap14;
int Wrap15;

int Clipping;
int Lighting;
float4 Ambient; // float4 or dword
int FogVertexMode;
int ColorVertex;
int LocalViewer;
int NormalizeNormals;
int DiffuseMaterialSource;
int SpecularMaterialSource;
int AmbientMaterialSource;
int EmissiveMaterialSource;

int VertexBlend;
int ClipPlaneEnable;
float PointSize; // float or int
float PointSize_MIN; // float or int
float PointSize_MAX; // float or int
int PointSPRITEENABLE;
int PointScaleEnable;
float PointScale_A; // float or int
float PointScale_B; // float or int
float PointScale_C; // float or int

int MultisampleAntiAlias;
int MultisampleMask;
int PatchedGestyle;
int DebugMonitorToken;
int IndexedVertexBlendEnable;
int ColorWriteEnable;
float TweenFactor; // float or int
int BlendOp;
int PositionDegree;
int NormalDegree;
int ScissorTestEnable;
int SlopeScaleDepthBias;
int AntiAliasedLineEnable;

int EnableAdaptiveTessellation;
int MinTessellationLevel;
int MaxTessellationLevel;
int AdaptiveTess_X;
int AdaptiveTess_Y;
int AdaptiveTess_Z;
int AdaptiveTess_W;

int TwoSidedStencilMode;
int CCW_StencilFail;
int CCW_StencilZFail;
int CCW_StencilPass;
int CCW_StencilFunc;

int ColorWriteEnable1;
int ColorWriteEnable2;
int ColorWriteEnable3;
float4 BlendFactor; // float4 or dword
int SRGBWriteEnable;
int DepthBias;
int SeparateAlphaBlendEnable;
int SrcBlendAlpha;
int DestBlendAlpha;
int BlendOpAlpha;

int ColorOp;
int ColorArg0;
int ColorArg1;
int ColorArg2;

int AlphaOp;
int AlphaArg0;
int AlphaArg1;
int AlphaArg2;

int BumpEnvMat00;
int BumpEnvMat01;
int BumpEnvMat10;
int BumpEnvMat11;
int TexCoordIndex;
int BumpEnvLScale;
int BumpEnvLOffset;
int TextureTransformFlags;
int ResultArg;
int Constant;
int AddressU;
int AddressV;
int AddressW;
float4 BorderColor; // float4 or dword
int MagFilter;
int MinFilter;
int MipFilter;
int MipMapLODBias;
int MaxMipLevel;
int MaxAnisotropy;
int SRGBTexture;
int ElementIndex;
int DMapOffset;
float4 Diffuse;
float4 Ambient;
float4 Specular;
float4 Emissive;
float Power;
float4x4 View;
float4x4 Projection;

float4x4 Texture0;
float4x4 Texture1;
float4x4 Texture2;
float4x4 Texture3;
float4x4 Texture4;
float4x4 Texture5;
float4x4 Texture6;
float4x4 Texture7;

float4x4 World;
float4x4 World1;
float4x4 World2;
float4x4 World3;

int Type;
float4 Diffuse;
float4 Specular;
float4 Ambient;
float3 Position;
float3 Direction;
float Range;
float Falloff;
float Attenuation0;
float Attenuation1;
float Attenuation2;
float Theta;
float Phi;
int Enable;
texture Texture;
int DeviceType;
int AdapterOrdinal;
int Caps;
int Caps2;
int Caps3;
int PresentationIntervals;
int CursorCaps;
int DevCaps;
int PrimitiveMiscCaps;
int RasterCaps;
int ZCmpCaps;
int SrcBlendCaps;
int DestBlendCaps;
int AlphaCmpCaps;
int ShadeCaps;
int TextureCaps;
int TextureFilterCaps;
int CubeTextureFilterCaps;
int VolumeTextureFilterCaps;
int TextureAddressCaps;
int VolumeTextureAddressCaps;
int LineCaps;
int MaxTextureWidth;
int MaxTextureHeight;
int MaxVolumeExtent;
int MaxTextureRepeat;
int MaxTextureAspectRatio;
int MaxAnisotropy;
float MaxVertexW;
float GuardBandLeft;
float GuardBandTop;
float GuardBandRight;
float GuardBandBottom;
float ExtentsAdjust;
int StencilCaps;
int FVFCaps;
int TextureOpCaps;
int MaxTextureBlendStages;
int MaxSimultaneousTextures;
int VertexProcessingCaps;
int MaxActiveLights;
int MaxUserClipPlanes;
int MaxVertexBlendMatrices;
int MaxVertexBlendMatrixIndex;
float MaxPointSize;
int MaxPrimitiveCount;
int MaxVertexIndex;
int MaxStreams;
int MaxStreamStride;
int VertexShaderVersion;
int MaxVertexShaderConst;
int PixelShaderVersion;
float PixelShader1xMaxValue;
int DevCaps2;
float MaxNpatchTessellationLevel;
int Reserved5;
int MasterAdapterOrdinal;
int AdapterOrdinalInGroup;
int NumberOfAdaptersInGroup;
int DeclTypes;
int NumSimultaneousRTs;
int StretchRectFilterCaps;
int VS20Caps.Caps;
int VS20Caps.DynamicFlowControlDepth;
int VS20Caps.NumTemps;
int VS20Caps.StaticFlowControlDepth;
int PS20Caps.Caps;
int PS20Caps.DynamicFlowControlDepth;
int PS20Caps.NumTemps;
int PS20Caps.StaticFlowControlDepth;
int PS20Caps.NumInstructionSlots;
int VertexTextureFilterCaps;
int MaxVShaderInstructionsExecuted;
int MaxPShaderInstructionsExecuted;
int MaxVertexShader30InstructionSlots;
int MaxPixelShader30InstructionSlots;
int Position;
int PositionT;
int Normal;
int Color0;
int Color1;
int TexCoord0;
int TexCoord1;