@@ -131,7 +131,7 @@ void main()
idxOffset = u_clusters[clusterIdx];
- // out_color = lightHeatmap(idxOffset, 5, false, true, false, false); return;
+ // out_color = lightHeatmap(idxOffset, 5, false, false, true, false); return;
}
// Decode GBuffer
@@ -23,6 +23,7 @@ inline Bool testConeVsSphere(const Vec4& coneOrigin,
F32 sphereRadius)
{
ANKI_ASSERT(coneOrigin.w() == 0.0f && sphereCenter.w() == 0.0f && coneDir.w() == 0.0f);
+ coneAngle /= 2.0f;
const Vec4 V = sphereCenter - coneOrigin;
const F32 VlenSq = V.dot(V);
const F32 V1len = V.dot(coneDir);
@@ -399,7 +399,7 @@ void ClusterBin::binTile(U32 tileIdx, BinCtx& ctx)
const SpotLightQueueElement& slight = ctx.m_in->m_renderQueue->m_spotLights[i];
slightFrustum.setAll(slight.m_outerAngle, slight.m_outerAngle, 0.01f, slight.m_distance);
- slightFrustum.transform(Transform(slight.m_worldTransform));
+ slightFrustum.resetTransform(Transform(slight.m_worldTransform));
if(!insideClusterFrustum(frustumPlanes, slightFrustum))