From d3aa8a118cfaed768519c1db3214453e6d3ceb52 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 9 Jan 2021 19:45:19 +0100 Subject: fix rendering; update librw --- src/extras/custompipes_d3d9.cpp | 6 +----- src/extras/shaders/leedsBuilding_VS.cso | Bin 676 -> 652 bytes src/extras/shaders/leedsBuilding_VS.hlsl | 3 --- src/extras/shaders/leedsBuilding_VS.inc | 10 ++++------ 4 files changed, 5 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp index d2d50bca..993a64ce 100644 --- a/src/extras/custompipes_d3d9.cpp +++ b/src/extras/custompipes_d3d9.cpp @@ -699,10 +699,6 @@ RenderBlendPass(int pass) setIndices(building->instHeader->indexBuffer); setVertexDeclaration(building->instHeader->vertexDeclaration); d3ddevice->SetVertexShaderConstantF(VSLOC_combined, (float*)&building->combinedMat, 4); - if(building->lighting) - setAmbient(pAmbient->color); - else - setAmbient(black); InstanceData *inst = building->instHeader->inst; for(rw::uint32 j = 0; j < building->instHeader->numMeshes; j++, inst++){ @@ -723,7 +719,7 @@ RenderBlendPass(int pass) rw::RGBA color = m->color; color.alpha = (color.alpha * building->fadeAlpha)/255; - setMaterial(m->color, m->surfaceProps, 0.5f); + setMaterial(color, m->surfaceProps, 0.5f); drawInst(building->instHeader, inst); } diff --git a/src/extras/shaders/leedsBuilding_VS.cso b/src/extras/shaders/leedsBuilding_VS.cso index b4b94afa..6720364d 100644 Binary files a/src/extras/shaders/leedsBuilding_VS.cso and b/src/extras/shaders/leedsBuilding_VS.cso differ diff --git a/src/extras/shaders/leedsBuilding_VS.hlsl b/src/extras/shaders/leedsBuilding_VS.hlsl index 361d5058..3c40bef1 100644 --- a/src/extras/shaders/leedsBuilding_VS.hlsl +++ b/src/extras/shaders/leedsBuilding_VS.hlsl @@ -11,14 +11,12 @@ struct VS_in float4 Position : POSITION; float3 Normal : NORMAL; float2 TexCoord : TEXCOORD0; - float2 TexCoord1 : TEXCOORD1; float4 Prelight : COLOR0; }; struct VS_out { float4 Position : POSITION; float3 TexCoord0 : TEXCOORD0; // also fog - float2 TexCoord1 : TEXCOORD1; float4 Color : COLOR0; }; @@ -32,7 +30,6 @@ VS_out main(in VS_in input) float3 Normal = mul(normalMat, input.Normal); output.TexCoord0.xy = input.TexCoord; - output.TexCoord1.xy = input.TexCoord1; output.Color = input.Prelight; output.Color.rgb *= ambient.rgb; diff --git a/src/extras/shaders/leedsBuilding_VS.inc b/src/extras/shaders/leedsBuilding_VS.inc index 8b17983f..490a8c01 100644 --- a/src/extras/shaders/leedsBuilding_VS.inc +++ b/src/extras/shaders/leedsBuilding_VS.inc @@ -28,14 +28,13 @@ static unsigned char leedsBuilding_VS_cso[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, - 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, - 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, - 0x03, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, + 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, + 0x02, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x29, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x0d, 0x00, 0xff, 0xa0, 0x04, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x07, 0x80, 0x03, 0x00, 0xe4, 0x90, 0x2a, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x90, 0x2a, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, - 0x03, 0x00, 0xff, 0x90, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x02, 0x00, 0xff, 0x90, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0xff, 0x80, @@ -54,6 +53,5 @@ static unsigned char leedsBuilding_VS_cso[] = { 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, - 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00 }; -- cgit v1.2.3