Skip to content

Commit 9ef17e2

Browse files
sort out RadeonRays builtin GLSL
1 parent 56f45e1 commit 9ef17e2

File tree

5 files changed

+51
-82
lines changed

5 files changed

+51
-82
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#ifndef __IRR_EXT_RADEON_RAYS_INTERSECTION_INCLUDED__
2+
#define __IRR_EXT_RADEON_RAYS_INTERSECTION_INCLUDED__
3+
4+
struct irr_glsl_ext_RadeonRays_Intersection
5+
{
6+
// Shape ID
7+
int shapeid;
8+
// Primitve ID
9+
int primid;
10+
11+
int padding0;
12+
int padding1;
13+
14+
// UV parametrization
15+
vec4 uvwt;
16+
};
17+
18+
#endif
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#ifndef __IRR_EXT_RADEON_RAYS_RAY_INCLUDED__
2+
#define __IRR_EXT_RADEON_RAYS_RAY_INCLUDED__
3+
4+
struct irr_glsl_ext_RadeonRays_ray
5+
{
6+
vec3 origin;
7+
float maxT; // FLT_MAX
8+
vec3 direction;
9+
float time;
10+
int mask; // want to have it to -1
11+
int _active; // want to have it to 1
12+
int backfaceCulling; // want to have it to 0
13+
int useless_padding; // can be used to forward data
14+
};
15+
16+
irr_glsl_ext_RadeonRays_ray irr_glsl_ext_RadeonRays_constructDefaultRay(in vec3 origin, in vec3 direction, in float maxLen, in int userData)
17+
{
18+
RadeonRays_ray retval;
19+
retval.origin = origin;
20+
retval.maxT = maxLen;
21+
retval.direction = direction;
22+
retval.time = 0.0;
23+
retval.mask = -1;
24+
retval._active = 1;
25+
retval.backfaceCulling = 0;
26+
retval.useless_padding = userData;
27+
return retval;
28+
}
29+
30+
#endif

include/irr/ext/RadeonRays/RadeonRays.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#undef USE_OPENCL
1010
#undef RR_STATIC_LIBRARY
1111

12-
#include "../../../irr/ext/RadeonRays/RadeonRaysIncludeLoader.h"
12+
#include "irr/ext/RadeonRays/RadeonRaysIncludeLoader.h"
1313

1414
namespace irr
1515
{

include/irr/ext/RadeonRays/RadeonRaysIncludeLoader.h

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

src/irr/builtin/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,7 @@ set(irr_resources_to_embed
126126
"irr/builtin/glsl/ext/LumaMeter/common.glsl"
127127
"irr/builtin/glsl/ext/LumaMeter/impl.glsl"
128128
"irr/builtin/glsl/ext/ToneMapper/operators.glsl"
129+
"irr/builtin/glsl/ext/RadeonRays/intersection.glsl"
130+
"irr/builtin/glsl/ext/RadeonRays/ray.glsl"
129131
PARENT_SCOPE)
130132

0 commit comments

Comments
 (0)