Skip to content

Commit 29b1800

Browse files
committed
resolved problems post merge
1 parent 52fe9df commit 29b1800

27 files changed

+61
-1321
lines changed
-503 KB
Binary file not shown.

examples_tests/22.RaytracedAO/common.glsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
{
2020
float x,y,z;
2121
};
22-
#define mat4 irr::core::matrix4SIMD
23-
#define mat4x3 irr::core::matrix3x4SIMD
22+
#define mat4 nbl::core::matrix4SIMD
23+
#define mat4x3 nbl::core::matrix3x4SIMD
2424
#endif
2525

2626

examples_tests/22.RaytracedAO/cull.comp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
layout(local_size_x = WORKGROUP_SIZE) in;
66

77

8-
#include <irr/builtin/glsl/utils/indirect_commands.glsl>
8+
#include <nbl/builtin/glsl/utils/indirect_commands.glsl>
99
layout(set=1, binding=0, std430, row_major) restrict readonly buffer PerInstanceStatic
1010
{
1111
ObjectStaticData_t staticData[];
@@ -20,7 +20,7 @@ layout(set=1, binding=2, std430, row_major) restrict readonly buffer PerInstance
2020
};
2121
layout(set=1, binding=3, std430) restrict coherent buffer IndirectDraws
2222
{
23-
irr_glsl_DrawElementsIndirectCommand_t draws[];
23+
nbl_glsl_DrawElementsIndirectCommand_t draws[];
2424
} commandBuff[2];
2525

2626

@@ -32,8 +32,8 @@ layout(push_constant, row_major) uniform PushConstants
3232

3333

3434

35-
#include <irr/builtin/glsl/utils/culling.glsl>
36-
#include <irr/builtin/glsl/utils/transform.glsl>
35+
#include <nbl/builtin/glsl/utils/culling.glsl>
36+
#include <nbl/builtin/glsl/utils/transform.glsl>
3737

3838

3939
// base instance remains unchanged
@@ -51,14 +51,14 @@ void main()
5151
commandBuff[pc.data.currentCommandBufferIx^0x1u].draws[drawID].instanceCount = 0u;
5252

5353
// cull
54-
const mat4 MVP = irr_glsl_pseudoMul4x4with4x3(pc.data.viewProjMatrix,worldMatrix);
54+
const mat4 MVP = nbl_glsl_pseudoMul4x4with4x3(pc.data.viewProjMatrix,worldMatrix);
5555
bool notCulled = true;
5656
if (false)
5757
{
5858
mat2x3 bbox;
5959
bbox[0] = cullData[globalObjectID].aabbMinEdge;
6060
bbox[1] = cullData[globalObjectID].aabbMaxEdge;
61-
notCulled = irr_glsl_couldBeVisible(MVP,bbox);
61+
notCulled = nbl_glsl_couldBeVisible(MVP,bbox);
6262
}
6363

6464
if (notCulled)

examples_tests/22.RaytracedAO/dirty_source/ExtraCrap.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
using namespace nbl;
1313
using namespace nbl::asset;
1414
using namespace nbl::video;
15-
using namespace nbl::scene;
1615

1716

1817
constexpr uint32_t kOptiXPixelSize = sizeof(uint16_t)*3u;
1918

2019

21-
Renderer::Renderer(IVideoDriver* _driver, IAssetManager* _assetManager, nbl::scene::ISceneManager* _smgr, core::smart_refctd_ptr<video::IGPUDescriptorSet>&& globalBackendDataDS, bool useDenoiser) :
20+
Renderer::Renderer(IVideoDriver* _driver, IAssetManager* _assetManager, scene::ISceneManager* _smgr, core::smart_refctd_ptr<IGPUDescriptorSet>&& globalBackendDataDS, bool useDenoiser) :
2221
m_useDenoiser(useDenoiser), m_driver(_driver), m_smgr(_smgr), m_assetManager(_assetManager), m_rrManager(ext::RadeonRays::Manager::create(m_driver)),
2322
m_sceneBound(FLT_MAX,FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX), /*m_renderSize{0u,0u}, */m_rightHanded(false),
2423
m_globalBackendDataDS(std::move(globalBackendDataDS)), // TODO: review this member
@@ -28,9 +27,9 @@ Renderer::Renderer(IVideoDriver* _driver, IAssetManager* _assetManager, nbl::sce
2827
m_rayBufferAsRR(nullptr,nullptr), m_intersectionBufferAsRR(nullptr,nullptr), m_rayCountBufferAsRR(nullptr,nullptr),
2928
rrInstances(),
3029
#endif
31-
m_lightCount(0u),
32-
m_visibilityBufferAttachments{nullptr}, m_maxSamples(0u), m_samplesPerPixelPerDispatch(0u), m_rayCountPerDispatch(0u), m_framesDone(0u), m_samplesComputedPerPixel(0u),
33-
m_sampleSequence(), m_scrambleTexture(), m_accumulation(), m_tonemapOutput(), m_visibilityBuffer(nullptr), tmpTonemapBuffer(nullptr), m_colorBuffer(nullptr)
30+
m_indirectDrawBuffers{nullptr}, m_cullPushConstants{core::matrix4SIMD(),0u,0u,1.f,0xdeadbeefu}, m_lightCount(0u),
31+
m_visibilityBuffer(nullptr), tmpTonemapBuffer(nullptr), m_colorBuffer(nullptr),
32+
m_visibilityBufferAttachments{nullptr}, m_maxSamples(0u), m_samplesPerPixelPerDispatch(0u), m_rayCountPerDispatch(0u), m_framesDone(0u), m_samplesComputedPerPixel(0u)
3433
#ifdef _NBL_BUILD_OPTIX_
3534
,m_cudaStream(nullptr)
3635
#endif
@@ -843,7 +842,7 @@ void Renderer::init(const SAssetBundle& meshes,
843842
{
844843
auto glsl =
845844
std::string(m_useDenoiser ? "#version 430 core\n#define USE_OPTIX_DENOISER\n" : "#version 430 core\n") +
846-
//"irr/builtin/glsl/ext/RadeonRays/"
845+
//"nbl/builtin/glsl/ext/RadeonRays/"
847846
rr_includes->getBuiltinInclude("ray.glsl") +
848847
lightStruct +
849848
compostShader;

examples_tests/22.RaytracedAO/dirty_source/ExtraCrap.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,6 @@ class Renderer : public nbl::core::IReferenceCounted, public nbl::core::Interfac
7171
return *this;
7272
}
7373

74-
struct VisibilityBufferPipelineKey
75-
{
76-
inline bool operator==(const VisibilityBufferPipelineKey& other) const
77-
{
78-
return vertexParams==other.vertexParams&&frontFaceIsCCW==other.frontFaceIsCCW;
79-
}
80-
81-
nbl::asset::SVertexInputParams vertexParams;
82-
uint8_t frontFaceIsCCW;
83-
};
84-
struct VisibilityBufferPipelineKeyHash
85-
{
86-
inline std::size_t operator()(const VisibilityBufferPipelineKey& key) const
87-
{
88-
std::basic_string_view view(reinterpret_cast<const char*>(&key),sizeof(key));
89-
return std::hash<decltype(view)>()(view);
90-
}
91-
};
92-
nbl::core::unordered_map<VisibilityBufferPipelineKey,nbl::core::smart_refctd_ptr<nbl::video::IGPURenderpassIndependentPipeline>,VisibilityBufferPipelineKeyHash> m_visibilityBufferFillPipelines;
9374

9475
nbl::core::vector<SLight> lights;
9576
nbl::core::vector<nbl::core::vectorSIMDf> lightRadiances;

examples_tests/22.RaytracedAO/fillVisBuffer.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#version 430 core
66

7-
#include <irr/builtin/glsl/utils/normal_encode.glsl>
7+
#include <nbl/builtin/glsl/utils/normal_encode.glsl>
88

99

1010
layout(location = 0) flat in uint ObjectID;

examples_tests/22.RaytracedAO/fillVisBuffer.vert

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ layout(location = 0) flat out uint ObjectID;
1818
layout(location = 1) out vec3 Normal;
1919
layout(location = 2) out vec2 UV;
2020

21-
#include <irr/builtin/glsl/utils/transform.glsl>
21+
#include <nbl/builtin/glsl/utils/transform.glsl>
2222

2323
void main()
2424
{
2525
DrawData_t self = instanceDataPerCamera.data[gl_InstanceIndex];
2626
ObjectID = self.objectID|(floatBitsToUint(self.detMVP)&0x80000000u); // use MSB to denote if face orientation should be flipped
2727

28-
gl_Position = irr_glsl_pseudoMul4x4with3x1(self.MVP,vPosition);
28+
gl_Position = nbl_glsl_pseudoMul4x4with3x1(self.MVP,vPosition);
2929

3030
const vec3 localNormal = normalize(vNormal); //have to normalize twice because of normal quantization
3131
Normal[0] = dot(staticData[self.objectID].normalMatrixRow0,localNormal);

examples_tests/22.RaytracedAO/raygen.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "raygenCommon.glsl"
33

44

5-
#include <irr/builtin/glsl/utils/normal_decode.glsl>
5+
#include <nbl/builtin/glsl/utils/normal_decode.glsl>
66
//
77
layout(set = 2, binding = 0, row_major) uniform RaygenData
88
{
@@ -190,7 +190,7 @@ void main()
190190

191191
for (uint i=0u; i<pc.data.samplesPerPixelPerDispatch; i++)
192192
{
193-
vec3 direction; // TODO: just use irr_glsl_LightSample?
193+
vec3 direction; // TODO: just use nbl_glsl_LightSample?
194194
float maxT;
195195
vec4 throughput = vec4(0.0,0.0,0.0,-1.0); // -1 needs to be there to ensure no backface culling on rays
196196

examples_tests/22.RaytracedAO/raygenCommon.glsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ layout(local_size_x = 16, local_size_y = 16) in;
99

1010
//
1111
layout(set = 1, binding = 0, rgba32f) restrict uniform image2D framebuffer;
12-
#include <irr/builtin/glsl/ext/RadeonRays/ray.glsl>
12+
#include <nbl/builtin/glsl/ext/RadeonRays/ray.glsl>
1313
layout(set = 1, binding = 1, std430) restrict writeonly buffer Rays
1414
{
15-
irr_glsl_ext_RadeonRays_ray rays[];
15+
nbl_glsl_ext_RadeonRays_ray rays[];
1616
};
1717
// lights
1818
layout(set = 1, binding = 2, std430) restrict readonly buffer CumulativeLightPDF

examples_tests/49.ArithmeticBallotUnitTest/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)