blob: 34eacd621906f4f60e2341f7dec0ea51733bf080 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
|