mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 00:43:00 +08:00
Using culling planes in entity lights
This commit is contained in:
parent
ee196a8e25
commit
66b512e8b6
@ -135,6 +135,9 @@ float4 DeferredLight(float3 camRel, float3 norm, float4 diffuse, float4 specular
|
|||||||
if (ldist > InstFalloff) return 0; //out of range of the light... TODO: capsules!
|
if (ldist > InstFalloff) return 0; //out of range of the light... TODO: capsules!
|
||||||
if (ldist <= 0) return 0;
|
if (ldist <= 0) return 0;
|
||||||
|
|
||||||
|
float d = dot(srpos, InstCullingPlaneNormal) - InstCullingPlaneOffset;
|
||||||
|
if (d > 0) return 0;
|
||||||
|
|
||||||
float4 rgbi = float4(InstColour, InstIntensity);
|
float4 rgbi = float4(InstColour, InstIntensity);
|
||||||
float3 lcol = rgbi.rgb;// * rgbi.a; // * 5.0f;
|
float3 lcol = rgbi.rgb;// * rgbi.a; // * 5.0f;
|
||||||
float3 ldir = srpos / ldist;
|
float3 ldir = srpos / ldist;
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user