Skip to content

Commit 994e388

Browse files
optimize the intersection struct size
1 parent add4281 commit 994e388

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

examples_tests/22.RaytracedAO/closestHit.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void main()
8282
if (_continue)
8383
{
8484
// if we ever support spatially varying emissive, we'll need to hoist barycentric computation and UV fetching to the position fetching
85-
const vec2 compactBary = vec2(1.f-intersection.uvwt.x-intersection.uvwt.y,intersection.uvwt.x); // radeon rays is a special boy and does its barycentrics weird
85+
const vec2 compactBary = vec2(1.f-intersection.uv.x-intersection.uv.y,intersection.uv.x); // radeon rays is a special boy and does its barycentrics weird
8686

8787
//
8888
const nbl_glsl_xoroshiro64star_state_t scramble_start_state = nbl_glsl_xoroshiro64star_state_t(ray.mask,ray._active);
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
#ifndef _NBL_EXT_RADEON_RAYS_INTERSECTION_INCLUDED_
22
#define _NBL_EXT_RADEON_RAYS_INTERSECTION_INCLUDED_
33

4-
// for the love of god, lets optimize this into 16 bytes
54
struct nbl_glsl_ext_RadeonRays_Intersection
65
{
76
// Shape ID
87
int shapeid;
98
// Primitve ID
109
int primid;
11-
12-
int padding0;
13-
int padding1;
14-
1510
// UV parametrization
16-
vec4 uvwt;
11+
vec2 uv;
1712
};
1813

1914
#endif

0 commit comments

Comments
 (0)