Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
MaterialGGX.hpp
1#pragma once
2#include "scene/Scene.hpp"
3#include "Common.hpp"
4
11public:
12
14 MaterialGGX() = delete;
15
24 static glm::vec3 sampleAndEval(const glm::vec3 & wo, const glm::vec3 & baseColor, float roughness, float metallic, glm::vec3 & wi);
25
34 static glm::vec3 eval(const glm::vec3 & wo, const glm::vec3 & baseColor, float roughness, float metallic, const glm::vec3 & wi);
35
36private:
37
43 static glm::vec3 F(glm::vec3 F0, float VdotH);
44
50 static float D(float NdotH, float alpha);
51
58 static float V(float NdotL, float NdotV, float alpha);
59
64 static float alphaFromRoughness(float roughness);
65
75 static glm::vec3 GGX(const glm::vec3 & wo, const glm::vec3 & baseColor, float alpha, float metallic, const glm::vec3 & wi, float * pdf);
76};
CPU methods for evaluating the Cook-Torrance BRDF (Lambert+GGX/Towbridge-Reitz) for a given set of pa...
Definition: MaterialGGX.hpp:10
static float alphaFromRoughness(float roughness)
Definition: MaterialGGX.cpp:24
static float V(float NdotL, float NdotV, float alpha)
Definition: MaterialGGX.cpp:15
static glm::vec3 GGX(const glm::vec3 &wo, const glm::vec3 &baseColor, float alpha, float metallic, const glm::vec3 &wi, float *pdf)
Definition: MaterialGGX.cpp:30
static float D(float NdotH, float alpha)
Definition: MaterialGGX.cpp:9
MaterialGGX()=delete
static glm::vec3 sampleAndEval(const glm::vec3 &wo, const glm::vec3 &baseColor, float roughness, float metallic, glm::vec3 &wi)
Definition: MaterialGGX.cpp:54
static glm::vec3 F(glm::vec3 F0, float VdotH)
Definition: MaterialGGX.cpp:5
static glm::vec3 eval(const glm::vec3 &wo, const glm::vec3 &baseColor, float roughness, float metallic, const glm::vec3 &wi)
Definition: MaterialGGX.cpp:94