+ | Fog imGUI

This commit is contained in:
TheRedShip
2025-01-14 20:38:03 +01:00
parent 95098711f7
commit 2899055b51
9 changed files with 103 additions and 36 deletions

View File

@ -23,8 +23,8 @@ struct GPUObject
alignas(16) glm::vec3 normal; // plane triangle
alignas(16) glm::vec3 vertex1; //quad triangle
alignas(16) glm::vec3 vertex2; //quad triangle
alignas(16) glm::vec3 vertex1;//quad triangle
alignas(16) glm::vec3 vertex2;//quad triangle
float radius; // sphere
@ -43,6 +43,17 @@ struct GPUMaterial
int type;
};
struct GPUVolume
{
alignas(16) glm::vec3 sigma_a;
alignas(16) glm::vec3 sigma_s;
alignas(16) glm::vec3 sigma_t;
float g;
bool enabled;
};
class Sphere;
class Camera;
@ -59,6 +70,7 @@ class Scene
const std::vector<GPUObject> &getObjectData() const;
std::vector<GPUMaterial> &getMaterialData();
GPUVolume &getVolume();
Camera *getCamera(void) const;
GPUMaterial getMaterial(int material_index);
@ -67,6 +79,8 @@ class Scene
std::vector<GPUObject> _gpu_objects;
std::vector<GPUMaterial> _gpu_materials;
GPUVolume _gpu_volume;
Camera *_camera;
};