This commit is contained in:
2024-10-16 10:15:16 +02:00
parent b7106c2af8
commit 1269b8dce7
10 changed files with 437 additions and 132 deletions

View File

@@ -2,6 +2,7 @@
#include <cstdint>
#include "Camera.h"
#include "DataTypes.h"
struct SDL_Window;
struct SDL_Surface;
@@ -24,12 +25,27 @@ namespace dae
void Render(Scene* pScene) const;
bool SaveBufferToImage() const;
void CycleLightingMode();
void ToggleShadows() { m_ShadowsEnabled = !m_ShadowsEnabled; }
private:
enum class LightingMode {
ObservedArea,
Radiance,
BRDF,
Combined
};
LightingMode m_CurrentLightingMode{ LightingMode::Combined };
bool m_ShadowsEnabled{ true };
SDL_Window* m_pWindow{};
SDL_Surface* m_pBuffer{};
uint32_t* m_pBufferPixels{};
int m_Width{};
int m_Height{};
@@ -37,5 +53,9 @@ namespace dae
Camera m_Camera{};
};
ColorRGB Raytrace(const Ray& viewRay, Scene* pScene) const;
std::vector<uint16_t> m_xvalues;
};
}