TriVoxel: Burley + (EON, Gotanda, Chan) Diffuse Models

This commit is contained in:
2026-09-08 22:02:48 -07:00
parent d44fd9993a
commit 42fdff4757
12 changed files with 241 additions and 24 deletions

View File

@ -83,16 +83,16 @@ vec3 sampleLight(const vec3 p, const vec3 n, const vec3 v, const float dotNV, co
vec3 direct;
if (abs(anisotropy) > 0.001 && dot(tangent, tangent) > 0.001) {
vec3 bitangent = normalize(cross(n, tangent));
direct = lambertDiffuseBRDF(albedo, dotNL) +
direct = diffuseBRDF(albedo, rough, f0, dotNL, dotNV, dotVH) +
anisotropicBRDF(f0, rough, anisotropy, anisoRot,
tangent, bitangent, n, l, v, dotNL, dotNV) * spec;
} else {
direct = lambertDiffuseBRDF(albedo, dotNL) +
direct = diffuseBRDF(albedo, rough, f0, dotNL, dotNV, dotVH) +
specularBRDF(f0, rough, dotNL, dotNH, dotNV, dotVH) * spec;
}
#else
vec3 direct = lambertDiffuseBRDF(albedo, dotNL) +
specularBRDF(f0, rough, dotNL, dotNH, dotNV, dotVH) * spec;
vec3 direct = diffuseBRDF(albedo, rough, f0, dotNL, dotNV, dotVH) +
specularBRDF(f0, rough, dotNL, dotNH, dotNV, dotVH) * spec;
#endif
#ifdef _ExtBRDF