Skip to content

Commit faa29e5

Browse files
implement my own wishlist (and fix a shader)
1 parent 769d908 commit faa29e5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

examples_tests/41.VisibilityBuffer/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
//! I advise to check out this file, its a basic input handler
1111
#include "../common/QToQuitEventReceiver.h"
1212

13+
#ifdef DEBUG_AABBS
1314
#include "nbl/ext/DebugDraw/CDraw3DLine.h"
15+
#endif
1416

1517
using namespace nbl;
1618
using namespace nbl::core;
@@ -260,7 +262,9 @@ int main()
260262
auto* am = device->getAssetManager();
261263
auto* fs = am->getFileSystem();
262264

265+
#ifdef DEBUG_AABBS
263266
auto draw3DLine = ext::DebugDraw::CDraw3DLine::create(driver);
267+
#endif
264268

265269
//
266270
auto createScreenSizedImage = [driver,&params](const E_FORMAT format) -> auto
@@ -301,7 +305,9 @@ int main()
301305
//
302306
SceneData sceneData;
303307
CullShaderData cullShaderData;
308+
#ifdef DEBUG_AABBS
304309
core::vector<std::pair<ext::DebugDraw::S3DLineVertex, ext::DebugDraw::S3DLineVertex>> dbgLines;
310+
#endif
305311
{
306312
//
307313
smart_refctd_ptr<IGPUDescriptorSetLayout> perFrameDSLayout,shadingDSLayout;
@@ -597,7 +603,9 @@ int main()
597603

598604
batchCullDataEnd->drawCommandGUID = packedMeshBufferData.mdiParameterOffset + i;
599605

606+
#ifdef DEBUG_AABBS
600607
draw3DLine->enqueueBox(dbgLines, aabbs[aabbIdx], 0.0f, 0.0f, 0.0f, 1.0f, core::matrix3x4SIMD());
608+
#endif
601609

602610
batchCullDataEnd++;
603611
aabbIdx++;
@@ -961,8 +969,10 @@ int main()
961969
);
962970
}
963971

972+
#ifdef DEBUG_AABBS
964973
//draw aabbs
965974
draw3DLine->draw(camera->getConcatenatedMatrix(), dbgLines);
975+
#endif
966976

967977
// shade
968978
driver->bindDescriptorSets(video::EPBP_COMPUTE,sceneData.shadeVBufferPpln->getLayout(),0u,4u,ds,nullptr);

include/nbl/builtin/glsl/utils/transform.glsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef _NBL_BUILTIN_GLSL_UTILS_TRANSFORM_INCLUDED_
66
#define _NBL_BUILTIN_GLSL_UTILS_TRANSFORM_INCLUDED_
77

8+
#include <nbl/builtin/glsl/limits/numeric.glsl>
9+
810
// move to ieee754 header?
911
mat3 nbl_glsl_mul_with_bounds_wo_gamma(out mat3 error, in mat3 a, in mat3 b, in float b_relative_error)
1012
{

0 commit comments

Comments
 (0)