Add generated reference shaders again
This commit is contained in:
parent
b2a667520d
commit
0f72199b8f
10
reference/opt/shaders/vulkan/rchit/ray_tracing.vk.rchit
Normal file
10
reference/opt/shaders/vulkan/rchit/ray_tracing.vk.rchit
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 1.0;
|
||||
}
|
||||
|
10
reference/opt/shaders/vulkan/rchit/ray_tracing.vk.rchit.vk
Normal file
10
reference/opt/shaders/vulkan/rchit/ray_tracing.vk.rchit.vk
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 1.0;
|
||||
}
|
||||
|
12
reference/opt/shaders/vulkan/rgen/pure_call.vk.rgen
Normal file
12
reference/opt/shaders/vulkan/rgen/pure_call.vk.rgen
Normal file
@ -0,0 +1,12 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(binding = 1) uniform accelerationStructureNV as;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 _55 = vec2(gl_LaunchIDNV.xy);
|
||||
vec2 _59 = vec2(gl_LaunchSizeNV.xy);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, vec3(_55.x / _59.x, _55.y / _59.y, 1.0), 0.0, vec3(0.0, 0.0, -1.0), 1000.0, 0);
|
||||
}
|
||||
|
12
reference/opt/shaders/vulkan/rgen/pure_call.vk.rgen.vk
Normal file
12
reference/opt/shaders/vulkan/rgen/pure_call.vk.rgen.vk
Normal file
@ -0,0 +1,12 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(set = 0, binding = 1) uniform accelerationStructureNV as;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 _55 = vec2(gl_LaunchIDNV.xy);
|
||||
vec2 _59 = vec2(gl_LaunchSizeNV.xy);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, vec3(_55.x / _59.x, _55.y / _59.y, 1.0), 0.0, vec3(0.0, 0.0, -1.0), 1000.0, 0);
|
||||
}
|
||||
|
15
reference/opt/shaders/vulkan/rgen/ray_tracing.vk.rgen
Normal file
15
reference/opt/shaders/vulkan/rgen/ray_tracing.vk.rgen
Normal file
@ -0,0 +1,15 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(binding = 1) uniform accelerationStructureNV as;
|
||||
layout(location = 0) rayPayloadNV float payload;
|
||||
layout(binding = 0, rgba8) uniform writeonly image2D image;
|
||||
|
||||
void main()
|
||||
{
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, vec3(float(gl_LaunchIDNV.x) / float(gl_LaunchSizeNV.x), float(gl_LaunchIDNV.y) / float(gl_LaunchSizeNV.y), 1.0), 0.0, vec3(0.0, 0.0, -1.0), 1000.0, 0);
|
||||
vec4 _68 = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
_68.y = payload;
|
||||
imageStore(image, ivec2(gl_LaunchIDNV.xy), _68);
|
||||
}
|
||||
|
15
reference/opt/shaders/vulkan/rgen/ray_tracing.vk.rgen.vk
Normal file
15
reference/opt/shaders/vulkan/rgen/ray_tracing.vk.rgen.vk
Normal file
@ -0,0 +1,15 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(set = 0, binding = 1) uniform accelerationStructureNV as;
|
||||
layout(location = 0) rayPayloadNV float payload;
|
||||
layout(set = 0, binding = 0, rgba8) uniform writeonly image2D image;
|
||||
|
||||
void main()
|
||||
{
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, vec3(float(gl_LaunchIDNV.x) / float(gl_LaunchSizeNV.x), float(gl_LaunchIDNV.y) / float(gl_LaunchSizeNV.y), 1.0), 0.0, vec3(0.0, 0.0, -1.0), 1000.0, 0);
|
||||
vec4 _68 = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
_68.y = payload;
|
||||
imageStore(image, ivec2(gl_LaunchIDNV.xy), _68);
|
||||
}
|
||||
|
10
reference/opt/shaders/vulkan/rmiss/ray_tracing.vk.rmiss
Normal file
10
reference/opt/shaders/vulkan/rmiss/ray_tracing.vk.rmiss
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 0.0;
|
||||
}
|
||||
|
10
reference/opt/shaders/vulkan/rmiss/ray_tracing.vk.rmiss.vk
Normal file
10
reference/opt/shaders/vulkan/rmiss/ray_tracing.vk.rmiss.vk
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 0.0;
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"entryPoints" : [
|
||||
{
|
||||
"name" : "main",
|
||||
"mode" : "rgen"
|
||||
}
|
||||
],
|
||||
"acceleration_structures" : [
|
||||
{
|
||||
"type" : "accelerationStructureNV",
|
||||
"name" : "as",
|
||||
"set" : 0,
|
||||
"binding" : 1
|
||||
}
|
||||
]
|
||||
}
|
10
reference/shaders/vulkan/rchit/ray_tracing.vk.rchit
Normal file
10
reference/shaders/vulkan/rchit/ray_tracing.vk.rchit
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 1.0;
|
||||
}
|
||||
|
10
reference/shaders/vulkan/rchit/ray_tracing.vk.rchit.vk
Normal file
10
reference/shaders/vulkan/rchit/ray_tracing.vk.rchit.vk
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 1.0;
|
||||
}
|
||||
|
21
reference/shaders/vulkan/rgen/pure_call.vk.rgen
Normal file
21
reference/shaders/vulkan/rgen/pure_call.vk.rgen
Normal file
@ -0,0 +1,21 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(binding = 1) uniform accelerationStructureNV as;
|
||||
layout(location = 0) rayPayloadNV float payload;
|
||||
|
||||
float pure_call(vec2 launchID, vec2 launchSize)
|
||||
{
|
||||
vec3 origin = vec3(launchID.x / launchSize.x, launchID.y / launchSize.y, 1.0);
|
||||
vec3 direction = vec3(0.0, 0.0, -1.0);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 param = vec2(gl_LaunchIDNV.xy);
|
||||
vec2 param_1 = vec2(gl_LaunchSizeNV.xy);
|
||||
float _62 = pure_call(param, param_1);
|
||||
}
|
||||
|
21
reference/shaders/vulkan/rgen/pure_call.vk.rgen.vk
Normal file
21
reference/shaders/vulkan/rgen/pure_call.vk.rgen.vk
Normal file
@ -0,0 +1,21 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(set = 0, binding = 1) uniform accelerationStructureNV as;
|
||||
layout(location = 0) rayPayloadNV float payload;
|
||||
|
||||
float pure_call(vec2 launchID, vec2 launchSize)
|
||||
{
|
||||
vec3 origin = vec3(launchID.x / launchSize.x, launchID.y / launchSize.y, 1.0);
|
||||
vec3 direction = vec3(0.0, 0.0, -1.0);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 param = vec2(gl_LaunchIDNV.xy);
|
||||
vec2 param_1 = vec2(gl_LaunchSizeNV.xy);
|
||||
float _62 = pure_call(param, param_1);
|
||||
}
|
||||
|
17
reference/shaders/vulkan/rgen/ray_tracing.vk.rgen
Normal file
17
reference/shaders/vulkan/rgen/ray_tracing.vk.rgen
Normal file
@ -0,0 +1,17 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(binding = 1) uniform accelerationStructureNV as;
|
||||
layout(location = 0) rayPayloadNV float payload;
|
||||
layout(binding = 0, rgba8) uniform writeonly image2D image;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 col = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
vec3 origin = vec3(float(gl_LaunchIDNV.x) / float(gl_LaunchSizeNV.x), float(gl_LaunchIDNV.y) / float(gl_LaunchSizeNV.y), 1.0);
|
||||
vec3 direction = vec3(0.0, 0.0, -1.0);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0);
|
||||
col.y = payload;
|
||||
imageStore(image, ivec2(gl_LaunchIDNV.xy), col);
|
||||
}
|
||||
|
17
reference/shaders/vulkan/rgen/ray_tracing.vk.rgen.vk
Normal file
17
reference/shaders/vulkan/rgen/ray_tracing.vk.rgen.vk
Normal file
@ -0,0 +1,17 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(set = 0, binding = 1) uniform accelerationStructureNV as;
|
||||
layout(location = 0) rayPayloadNV float payload;
|
||||
layout(set = 0, binding = 0, rgba8) uniform writeonly image2D image;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 col = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
vec3 origin = vec3(float(gl_LaunchIDNV.x) / float(gl_LaunchSizeNV.x), float(gl_LaunchIDNV.y) / float(gl_LaunchSizeNV.y), 1.0);
|
||||
vec3 direction = vec3(0.0, 0.0, -1.0);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0);
|
||||
col.y = payload;
|
||||
imageStore(image, ivec2(gl_LaunchIDNV.xy), col);
|
||||
}
|
||||
|
10
reference/shaders/vulkan/rmiss/ray_tracing.vk.rmiss
Normal file
10
reference/shaders/vulkan/rmiss/ray_tracing.vk.rmiss
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 0.0;
|
||||
}
|
||||
|
10
reference/shaders/vulkan/rmiss/ray_tracing.vk.rmiss.vk
Normal file
10
reference/shaders/vulkan/rmiss/ray_tracing.vk.rmiss.vk
Normal file
@ -0,0 +1,10 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : require
|
||||
|
||||
layout(location = 0) rayPayloadInNV float payload;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload = 0.0;
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ void main()
|
||||
{
|
||||
vec4 col = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
vec3 origin = vec3(float(gl_LaunchIDNV.x) / float(gl_LaunchSizeNV.x), float(gl_LaunchIDNV.y) / float(gl_LaunchSizeNV.y), 1.0);
|
||||
vec3 dir = vec3(0.0, 0.0, -1.0);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, dir, 1000.0, 0);
|
||||
vec3 direction = vec3(0.0, 0.0, -1.0);
|
||||
traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0);
|
||||
col.y = payload;
|
||||
imageStore(image, ivec2(gl_LaunchIDNV.xy), col);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user