one more texture to the GPU

This commit is contained in:
CDaut 2024-06-25 18:43:33 +02:00
parent 5cf68c5219
commit e7a7133e9f
Signed by: clara
GPG key ID: 223391B52FAD4463
1034 changed files with 324 additions and 4194331 deletions

View file

@ -42,15 +42,16 @@ using uint = unsigned int;
#endif
START_BINDING(SceneBindings)
eGlobals = 0, // Global uniform containing camera matrices
eSceneDesc = 1, // Access to the scene buffers
eTextures = 2 // Access to textures
eGlobals = 0, // Global uniform containing camera matrices
eSceneDesc = 1, // Access to the scene buffers
eTextures = 2, // Access to textures
ePointsetTexture = 3 //Texture containing the pointset for primary raygen
END_BINDING();
START_BINDING(RtxBindings)
eTlas = 0, // Top-level acceleration structure
eOutImage = 1, // Ray tracer output image
ePrimLookup = 2 // Lookup of objects
eTlas = 0, // Top-level acceleration structure
eOutImage = 1, // Ray tracer output image
ePrimLookup = 2 // Lookup of objects
END_BINDING();
// clang-format on

View file

@ -34,6 +34,8 @@ layout(set = 0, binding = 1, rgba32f) uniform image2D image;
layout(set = 1, binding = 0) uniform _GlobalUniforms { GlobalUniforms uni; };
layout(push_constant) uniform _PushConstantRay { PushConstantRay pcRay; };
layout(set = 1, binding = ePointsetTexture) uniform sampler2D pointset; // bluenoise pointset
// clang-format on
void main()
@ -63,5 +65,7 @@ void main()
0 // payload (location = 0)
);
imageStore(image, ivec2(gl_LaunchIDEXT.xy), vec4(prd.hitValue, 1.0));
//imageStore(image, ivec2(gl_LaunchIDEXT.xy), vec4(prd.hitValue, 1.0));
vec2 uv = vec2(float(gl_LaunchIDEXT.x) / float(gl_LaunchSizeEXT.x) - 0.5, float(gl_LaunchIDEXT.y) / float(gl_LaunchSizeEXT.y) - 0.5);
imageStore(image, ivec2(gl_LaunchIDEXT.xy), texture(pointset, uv));
}