cleanup
This commit is contained in:
@@ -39,7 +39,7 @@ bool checkPointInView(vec4 point) {
|
|||||||
|
|
||||||
vec3 minBB = vec3(0.0f);
|
vec3 minBB = vec3(0.0f);
|
||||||
vec3 maxBB = vec3(0.0f);
|
vec3 maxBB = vec3(0.0f);
|
||||||
bool insideFrustum = false;
|
bool frustumCulled = false;
|
||||||
|
|
||||||
float screenSize = 0.0f;
|
float screenSize = 0.0f;
|
||||||
|
|
||||||
@@ -60,10 +60,10 @@ void setupScreenspace(in UnpackedNode node) {
|
|||||||
|
|
||||||
vec3 basePos = vec3(((node.pos<<node.lodLevel)-camSecPos)<<5)-camSubSecPos;
|
vec3 basePos = vec3(((node.pos<<node.lodLevel)-camSecPos)<<5)-camSubSecPos;
|
||||||
|
|
||||||
insideFrustum = !outsideFrustum(frustum, basePos, float(32<<node.lodLevel));
|
frustumCulled = outsideFrustum(frustum, basePos, float(32<<node.lodLevel));
|
||||||
|
|
||||||
//Fast exit
|
//Fast exit
|
||||||
if (!insideFrustum) {
|
if (frustumCulled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ void setupScreenspace(in UnpackedNode node) {
|
|||||||
|
|
||||||
//Checks if the node is implicitly culled (outside frustum)
|
//Checks if the node is implicitly culled (outside frustum)
|
||||||
bool outsideFrustum() {
|
bool outsideFrustum() {
|
||||||
return !insideFrustum;// maxW < 16 is a trick where 16 is the near plane
|
return frustumCulled;// maxW < 16 is a trick where 16 is the near plane
|
||||||
|
|
||||||
//|| any(lessThanEqual(minBB, vec3(0.0f, 0.0f, 0.0f))) || any(lessThanEqual(vec3(1.0f, 1.0f, 1.0f), maxBB));
|
//|| any(lessThanEqual(minBB, vec3(0.0f, 0.0f, 0.0f))) || any(lessThanEqual(vec3(1.0f, 1.0f, 1.0f), maxBB));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user