|
@@ -91,10 +91,14 @@ class CapsuleLight extends Light {
|
|
|
// TODO optimize culling
|
|
|
s.r = range + length;
|
|
|
|
|
|
- if( !ctx.camera.frustum.hasSphere(s) )
|
|
|
+ if( !inFrustum(ctx.camera.frustum) )
|
|
|
return;
|
|
|
|
|
|
super.emit(ctx);
|
|
|
ctx.emitPass(ctx.pbrLightPass, this);
|
|
|
}
|
|
|
+
|
|
|
+ override function inFrustum(frustum : h3d.col.Frustum) {
|
|
|
+ return frustum.hasSphere(s);
|
|
|
+ }
|
|
|
}
|