Add generated reference shaders again

This commit is contained in:
Patrick Mours 2019-03-26 15:09:57 +01:00
parent b2a667520d
commit 0f72199b8f
18 changed files with 228 additions and 2 deletions

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 1.0;
}

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 1.0;
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 0.0;
}

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 0.0;
}

View File

@ -0,0 +1,16 @@
{
"entryPoints" : [
{
"name" : "main",
"mode" : "rgen"
}
],
"acceleration_structures" : [
{
"type" : "accelerationStructureNV",
"name" : "as",
"set" : 0,
"binding" : 1
}
]
}

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 1.0;
}

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 1.0;
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 0.0;
}

View File

@ -0,0 +1,10 @@
#version 460
#extension GL_NV_ray_tracing : require
layout(location = 0) rayPayloadInNV float payload;
void main()
{
payload = 0.0;
}

View File

@ -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);
}