|
|
|
|
|
|
[GenerateHLSL] |
|
|
|
public class DiffusionProfileConstants |
|
|
|
{ |
|
|
|
public const int DIFFUSION_PROFILE_COUNT = 16; // Max. number of profiles, including the slot taken by the neutral profile
|
|
|
|
public const int DIFFUSION_PROFILE_NEUTRAL_ID = 0; // Does not result in blurring
|
|
|
|
public const int SSS_N_SAMPLES_NEAR_FIELD = 55; // Used for extreme close ups; must be a Fibonacci number
|
|
|
|
public const int SSS_N_SAMPLES_FAR_FIELD = 21; // Used at a regular distance; must be a Fibonacci number
|
|
|
|
public const int SSS_LOD_THRESHOLD = 4; // The LoD threshold of the near-field kernel (in pixels)
|
|
|
|
public const int DIFFUSION_PROFILE_COUNT = 16; // Max. number of profiles, including the slot taken by the neutral profile
|
|
|
|
public const int DIFFUSION_PROFILE_NEUTRAL_ID = 0; // Does not result in blurring
|
|
|
|
public const int SSS_N_SAMPLES_NEAR_FIELD = 55; // Used for extreme close ups; must be a Fibonacci number
|
|
|
|
public const int SSS_N_SAMPLES_FAR_FIELD = 21; // Used at a regular distance; must be a Fibonacci number
|
|
|
|
public const int SSS_LOD_THRESHOLD = 4; // The LoD threshold of the near-field kernel (in pixels)
|
|
|
|
public const int SSS_BASIC_N_SAMPLES = 11; // Must be an odd number
|
|
|
|
public const int SSS_BASIC_DISTANCE_SCALE = 3; // SSS distance units per centimeter
|
|
|
|
public const int SSS_BASIC_N_SAMPLES = 11; // Must be an odd number
|
|
|
|
public const int SSS_BASIC_DISTANCE_SCALE = 3; // SSS distance units per centimeter
|
|
|
|
// <<< Old SSS Model
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
public DiffusionProfile[] profiles; |
|
|
|
|
|
|
|
[NonSerialized] public uint texturingModeFlags; // 1 bit/profile; 0 = PreAndPostScatter, 1 = PostScatter
|
|
|
|
[NonSerialized] public uint transmissionFlags; // 2 bit/profile; 0 = inf. thick, 1 = thin, 2 = regular
|
|
|
|
[NonSerialized] public uint texturingModeFlags; // 1 bit/profile: 0 = PreAndPostScatter, 1 = PostScatter
|
|
|
|
[NonSerialized] public uint transmissionFlags; // 1 bit/profile: 0 = regular, 1 = thin
|
|
|
|
[NonSerialized] public Vector4[] thicknessRemaps; // Remap: 0 = start, 1 = end - start
|
|
|
|
[NonSerialized] public Vector4[] worldScales; // X = meters per world unit; Y = world units per meter
|
|
|
|
[NonSerialized] public Vector4[] shapeParams; // RGB = S = 1 / D, A = filter radius
|
|
|
|