forked from LeenkxTeam/LNXSDK
Light fixes to correct light culling. Now lights show up properly!
This commit is contained in:
@ -478,8 +478,8 @@ void main() {
|
||||
#endif
|
||||
|
||||
#ifdef _Clusters
|
||||
// compute linear depth for clustering directly from the reconstructed view-space pos:
|
||||
float viewz = length(viewPos);
|
||||
// compute depth for clustering: use the view-space Z component (linearized depth)
|
||||
float viewz = viewPos.z;
|
||||
int clusterI = getClusterI(texCoord, viewz, cameraPlane);
|
||||
int numLights = int(texelFetch(clustersData, ivec2(clusterI, 0), 0).r * 255);
|
||||
|
||||
|
Reference in New Issue
Block a user