Skip to content
Snippets Groups Projects
Commit a91a74e2 authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#94] Merge

parents 1a2f45bc 41e26d71
No related branches found
No related tags found
1 merge request!77Resolve "SAF-R Module"
Pipeline #27107 passed
...@@ -34,9 +34,9 @@ layout(std430, binding = 1) coherent buffer spheres{ ...@@ -34,9 +34,9 @@ layout(std430, binding = 1) coherent buffer spheres{
layout(set=0, binding = 2, rgba8) uniform image2D outImage; layout(set=0, binding = 2, rgba8) uniform image2D outImage;
layout( push_constant ) uniform constants{ layout( push_constant ) uniform constants{
float lightCount; int lightCount;
float matCount; int matCount;
float sphereCount; int sphereCount;
}; };
bool ray_intersect(const vec3 origin, const vec3 dir, out float t0, const int id){ bool ray_intersect(const vec3 origin, const vec3 dir, out float t0, const int id){
...@@ -125,7 +125,6 @@ vec3 computeHitLighting(Intersection intersection, vec3 V, out float outReflecti ...@@ -125,7 +125,6 @@ vec3 computeHitLighting(Intersection intersection, vec3 V, out float outReflecti
vec3 castRay(const vec3 initialOrigin, const vec3 initialDirection, int max_depth) { vec3 castRay(const vec3 initialOrigin, const vec3 initialDirection, int max_depth) {
vec3 skyColor = vec3(0.2, 0.7, 0.8); vec3 skyColor = vec3(0.2, 0.7, 0.8);
vec3 rayOrigin = initialOrigin; vec3 rayOrigin = initialOrigin;
vec3 rayDirection = initialDirection; vec3 rayDirection = initialDirection;
......
...@@ -133,8 +133,8 @@ int main(int argc, const char** argv) { ...@@ -133,8 +133,8 @@ int main(int argc, const char** argv) {
); );
sphereBuffer.fill(spheres); sphereBuffer.fill(spheres);
glm::vec3 pushData = glm::vec3((lights.size()), (materials.size()), (spheres.size())); glm::ivec3 pushData = glm::ivec3((lights.size()), (materials.size()), (spheres.size()));
vkcv::PushConstants pushConstantsCompute(sizeof(glm::vec3)); vkcv::PushConstants pushConstantsCompute(sizeof(glm::ivec3));
pushConstantsCompute.appendDrawcall(pushData); pushConstantsCompute.appendDrawcall(pushData);
vkcv::DescriptorWrites setWrites; vkcv::DescriptorWrites setWrites;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment