Fix for lodlights intensity

This commit is contained in:
dexy 2021-05-04 18:42:41 +10:00
parent 37ac0ba62b
commit 5426ceada8
4 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ float4 DeferredLODLight(float3 camRel, float3 norm, float4 diffuse, float4 specu
if (ldist <= 0) return 0; if (ldist <= 0) return 0;
float4 rgbi = Unpack4x8UNF(lodlight.Colour).gbar; float4 rgbi = Unpack4x8UNF(lodlight.Colour).gbar;
float3 lcol = rgbi.rgb * rgbi.a * 100.0f; float3 lcol = rgbi.rgb * rgbi.a * 96.0f;
float3 ldir = srpos / ldist; float3 ldir = srpos / ldist;
float pclit = saturate(dot(ldir, norm)); float pclit = saturate(dot(ldir, norm));
float lamt = 1; float lamt = 1;

View File

@ -128,7 +128,7 @@ namespace CodeWalker.Project.Panels
uint r = la.ColorR; uint r = la.ColorR;
uint g = la.ColorG; uint g = la.ColorG;
uint b = la.ColorB; uint b = la.ColorB;
uint i = (byte)Math.Min(la.Intensity*4, 255); uint i = (byte)Math.Max(Math.Min(Math.Round(la.Intensity * 5.3125f), 255), 0);//5.1=255/48
uint c = (i << 24) + (r << 16) + (g << 8) + b; uint c = (i << 24) + (r << 16) + (g << 8) + b;
uint h = elight.Hash; uint h = elight.Hash;

Binary file not shown.

Binary file not shown.