Skip to content

Commit fc14152

Browse files
refactor the Mitsuba Loader's GLSL includes a little bit more
1 parent 82d4d95 commit fc14152

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#ifndef _NBL_BUILTIN_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_DESCRIPTOR_INCLUDED_
2+
#define _NBL_BUILTIN_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_DESCRIPTOR_INCLUDED_
3+
4+
5+
#include <nbl/builtin/glsl/ext/MitsubaLoader/instance_data_struct.glsl>
6+
7+
8+
#ifndef _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_SSBO_
9+
#define _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_SSBO_
10+
11+
#ifndef _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_SET_
12+
#define _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_SET_ 0
13+
#endif
14+
#ifndef _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_BINDING_
15+
#define _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_BINDING_ 5
16+
#endif
17+
18+
layout(set = _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_SET_, binding = _NBL_GLSL_EXT_MITSUBA_LOADER_INSTANCE_DATA_BINDING_, row_major, std430) readonly restrict buffer InstDataBuffer {
19+
nbl_glsl_ext_Mitsuba_Loader_instance_data_t data[];
20+
} InstData;
21+
#endif
22+
23+
24+
#endif

include/nbl/builtin/glsl/ext/MitsubaLoader/material_compiler_compatibility_impl.glsl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ layout(set = 0, binding = 4, std430) restrict readonly buffer BSDF_BUF
3333
{
3434
nbl_glsl_MC_bsdf_data_t data[];
3535
} bsdf_buf;
36-
#include <nbl/builtin/glsl/ext/MitsubaLoader/instance_data_struct.glsl>
37-
layout(set = 0, binding = 5, row_major, std430) readonly restrict buffer InstDataBuffer {
38-
nbl_glsl_ext_Mitsuba_Loader_instance_data_t data[];
39-
} InstData;
36+
#include <nbl/builtin/glsl/ext/MitsubaLoader/instance_data_descriptor.glsl>
4037
layout(set = 0, binding = 6, std430) restrict readonly buffer PREFETCH_INSTR_BUF
4138
{
4239
nbl_glsl_MC_prefetch_instr_t data[];

src/nbl/builtin/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ set(nbl_resources_to_embed
132132
"nbl/builtin/glsl/ext/RadeonRays/intersection.glsl"
133133
"nbl/builtin/glsl/ext/RadeonRays/ray.glsl"
134134
"nbl/builtin/glsl/ext/MitsubaLoader/instance_data_struct.glsl"
135+
"nbl/builtin/glsl/ext/MitsubaLoader/instance_data_descriptor.glsl"
135136
"nbl/builtin/glsl/ext/MitsubaLoader/material_compiler_compatibility_impl.glsl"
136137
PARENT_SCOPE)
137138

0 commit comments

Comments
 (0)