//*** // MAIN PIXEL SHADER CODE //*** float4 EnginePixelShader(EngineVertexToPixel input) : COLOR { float4 diffuseTex = tex2D(DiffuseTextureSampler,input.texCoord); // The following is decal code that is not yet // implemented as it causes other code to crash // please ignore for the time being /*float3 tanpos = mul(input.wPos,input.tangentMatrix); for(int i=0;i<8;i++) { if(decalActivated[i]) if(sqrt(pow(input.wPos.x-decalPos[i].x,2)+pow(input.wPos.y-decalPos[i].y,2)+pow(input.wPos.z-decalPos[i].z,2))