diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-07 18:56:39 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-07 18:56:39 -0800 |
| commit | 46f600fa6890bd9321a87d95e325b4f8f6694f27 (patch) | |
| tree | 6a46b04bd93873174fdf786ea5d617a786fdc7ac /data.cginc | |
| parent | eb56b40f4a67530eab5422f374bfbcad71b1c6a0 (diff) | |
Add data.cginc - header for data containers
Diffstat (limited to 'data.cginc')
| -rw-r--r-- | data.cginc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/data.cginc b/data.cginc new file mode 100644 index 0000000..34eacd6 --- /dev/null +++ b/data.cginc @@ -0,0 +1,36 @@ +#ifndef __DATA_INC +#define __DATA_INC + +#include "globals.cginc" + +// From filament: min roughness s.t. MIN_PERCEPTUAL_ROUGHNESS^4 > 0 in target +// precision. Although we use fp32, the higher min roughness gives us a broader +// specular highlight, which is preferable. +#define MIN_PERCEPTUAL_ROUGHNESS 0.045 +#define MIN_ROUGHNESS 0.002025 + +struct Pbr { + float4 albedo; + float3 normal; + float3x3 tbn; + float smoothness; + float roughness_perceptual; + float roughness; + float metallic; +#if defined(_EMISSIONS) && defined(FORWARD_BASE_PASS) + float3 emission; +#endif +#if defined(_AMBIENT_OCCLUSION) + float ao; +#endif +#if defined(_BENT_NORMALS) + float3 bent_normal; +#endif +#if defined(_CLEARCOAT) + float cc_roughness; + float cc_roughness_perceptual; + float cc_strength; +#endif +}; + +#endif // __DATA_INC |
