Error Message Starting Game
Posted: Sun Dec 16, 2018 2:29 pm
The first time I tried to start the game after installing the 1.5.3 patch. The file does look damaged.
Code: Select all
NAME lit_skin
[DEF]
POSITION
NORMAL
WEIGHTS
INDICES
TEX2
[VS].BLOB
float4x4 matWorld : register(c0);
float4x4 matWVP : register(c12);
float4x4 matL : register(c24);
float4x3 bones[48] : register(c32) ;
#include "uvtools.txt"
struct VS_IN
{
float4 objPos : POSITION; // Object space position
float3 normal : NORMAL;
float4 weights : BLENDWEIGHT ;
float4 index : BLENDINDICES ;
float2 tex0 : TEXCOORD0;
};
struct VS_OUT
{
float4 pos : POSITION ;
float4 refPos : TEXCOORD0 ;
float2 tex0 : TEXCOORD1 ;
float3 normal : TEXCOORD2 ;
};
VS_OUT main( VS_IN In )
{
VS_OUT outData;
float4 pos ;
In.objPos.w = 1 ;
int indices[4] = (int[ 4 ]) D3DCOLORtoUBYTE4( In.index );
float4 ww = In.weights ;
// NOTE reversed mul order to handle 4x3 (allows more matrices)
pos.xyz = mul(In.objPos, bones[ indices[0] ]) * ww.x ;
pos.xyz += mul(In.objPos, bones[ indices[1] ]) * ww.y ;
pos.xyz += mul(In.objPos, bones[ indices[2] ]) * ww.z ;
pos.xyz += mul(In.objPos, bones[ indices[3] ]) * ww.w ;
pos.w = 1 ;
float4 pp ;
pp = pos ;
outData.pos = mul( matWVP, pos );
outData.refPos = outData.pos ;
outData.tex0 = MapTex4x4(In.tex0) ;
float4 v ;
v.xyz = In.normal ;
v.w = 0 ;
// NOTE reversed mul order to handle 4x3 (allows more matrices)
pos.xyz = mul(v, bones[ indices[0] ]) * ww.x ;
pos.xyz += mul(v, bones[ indices[1] ]) * ww.y ;
pos.xyz += mul(v, bones[ indices[2] ]) * ww.z ;
pos.xyz += mul(v, bones[ indices[3] ]) * ww.w ;
outData.normal = normalize( mul(matWorld, pos.xyz)) ;
return outData ;
}
[PS].BLOB
sampler2D tex : register(s0);
float4 lightDir : register(c16);
struct PS_IN
{
float4 refPos : TEXCOORD0 ;
float2 tex : TEXCOORD1 ;
float3 normal : TEXCOORD2 ;
};
float4 main( PS_IN In ) : COLOR
{
float depthValue;
float4 color;
// Get the depth value of the pixel by dividing the Z pixel depth by the homogeneous W coordinate.
depthValue = In.refPos.z / In.refPos.w;
float4 t = tex2D(tex, In.tex) ;
color = float4(depthValue, depthValue, depthValue, t.w); // use alpha to shadow cutouts
return color;
}