2025-01-24 00:19:11 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
|
|
2025-01-26 15:27:43 +01:00
|
|
|
struct Payload
|
|
|
|
|
{
|
|
|
|
|
glm::vec3 accumulatedRadiance = glm::vec3(0);
|
2025-01-26 19:43:06 +01:00
|
|
|
glm::vec3 accumulatedMaterial = glm::vec3(1);
|
|
|
|
|
uint32_t depth = 0;
|
|
|
|
|
float emissive = 1;
|
2025-01-26 15:27:43 +01:00
|
|
|
};
|
|
|
|
|
|
2025-01-24 00:19:11 +01:00
|
|
|
struct Ray
|
|
|
|
|
{
|
|
|
|
|
glm::vec3 origin;
|
|
|
|
|
glm::vec3 direction;
|
2025-01-26 15:27:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct HitInfo
|
|
|
|
|
{
|
|
|
|
|
float t;
|
|
|
|
|
glm::vec3 position;
|
|
|
|
|
glm::vec3 normal;
|
2025-01-26 19:43:06 +01:00
|
|
|
// not entirely sure what that does
|
|
|
|
|
// its the normal being flipped based on some dot product
|
|
|
|
|
glm::vec3 normalLight;
|
2025-01-26 15:27:43 +01:00
|
|
|
glm::vec2 texCoords;
|
2025-01-24 00:19:11 +01:00
|
|
|
};
|