mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-25 00:12:52 +08:00
Fix for lodlights intensity
This commit is contained in:
parent
37ac0ba62b
commit
5426ceada8
@ -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;
|
||||||
|
@ -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.
Loading…
Reference in New Issue
Block a user