9
9
using namespace nbl ;
10
10
11
11
// #define SYNC_DEBUG
12
- // #define DEBUG_VIZ
12
+ #define DEBUG_VIZ
13
13
14
14
#define CLIPMAP
15
15
// #define OCTREE
@@ -1857,7 +1857,7 @@ class ClusteredRenderingSampleApp : public ApplicationBase
1857
1857
if ((ev.keyCode == ui::EKC_F) && (ev.action == ui::SKeyboardEvent::ECA_RELEASED))
1858
1858
{
1859
1859
const core::vectorSIMDf aabbCenter = camera.getPosition ();
1860
- const float extent = 500 .f ;
1860
+ const float extent = 100 .f ;
1861
1861
nbl_glsl_shapes_AABB_t aabb;
1862
1862
aabb.minVx = { aabbCenter.x - (extent / 2 .f ), aabbCenter.y - (extent / 2 .f ), aabbCenter.z - (extent / 2 .f ) };
1863
1863
aabb.maxVx = { aabbCenter.x + (extent / 2 .f ), aabbCenter.y + (extent / 2 .f ), aabbCenter.z + (extent / 2 .f ) };
@@ -1872,7 +1872,7 @@ class ClusteredRenderingSampleApp : public ApplicationBase
1872
1872
if ((ev.keyCode == ui::EKC_G) && (ev.action == ui::SKeyboardEvent::ECA_RELEASED))
1873
1873
{
1874
1874
const core::vectorSIMDf aabbCenter = camera.getPosition ();
1875
- const float extent = 500 .f ;
1875
+ const float extent = 100 .f ;
1876
1876
nbl_glsl_shapes_AABB_t aabb;
1877
1877
1878
1878
aabb.minVx = { aabbCenter.x - (extent / 2 .f ), aabbCenter.y - (extent / 2 .f ), aabbCenter.z - (extent / 2 .f ) };
@@ -2889,20 +2889,15 @@ class ClusteredRenderingSampleApp : public ApplicationBase
2889
2889
const uint32_t y = (i >> 1 ) & 0x1u ;
2890
2890
const uint32_t z = (i >> 2 ) & 0x1u ;
2891
2891
2892
- printf (" Vertex ID: [%d, %d, %d]\n " , x, y, z);
2893
2892
2894
2893
const core::vectorSIMDf aabbVertex (
2895
2894
(1u - x) * aabb.minVx .x + x * aabb.maxVx .x ,
2896
2895
(1u - y) * aabb.minVx .y + y * aabb.maxVx .y ,
2897
2896
(1u - z) * aabb.minVx .z + z * aabb.maxVx .z );
2898
2897
2899
- printf (" Vertex: [%f, %f, %f]\n " , aabbVertex.x , aabbVertex.y , aabbVertex.z );
2900
-
2901
2898
const core::vectorSIMDf waypoint = core::normalize (aabbVertex - cone.tip );
2902
2899
2903
2900
const core::vectorSIMDf normal = slerp_till_cosine (cone.direction , core::normalize (waypoint), core::sqrt (1 .f - cone.cosHalfAngle * cone.cosHalfAngle ));
2904
- printf (" normal: [%f, %f, %f]\n " , normal.x , normal.y , normal.z );
2905
- printf (" dot(cone.direction, normal): %f\n\n " , core::dot (cone.direction , normal).x );
2906
2901
if (core::dot (getFarthestPointInFront (aabb, normal) - cone.tip , normal).x < 0 .f )
2907
2902
return true ;
2908
2903
}
0 commit comments