This replaces the trilinear interpolation with manually placed samples to avoid most light leak. Add two new parameters to bias the sampling position: - Normal bias - View bias Move the irradiance smoothing parameter per grid. Pull Request: https://projects.blender.org/blender/blender/pulls/110312
43 lines
928 B
C
43 lines
928 B
C
/* SPDX-FileCopyrightText: 2023 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup DNA
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/* Struct members on own line. */
|
|
/* clang-format off */
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/** \name LightProbe Struct
|
|
* \{ */
|
|
|
|
#define _DNA_DEFAULT_LightProbe \
|
|
{ \
|
|
.grid_resolution_x = 4, \
|
|
.grid_resolution_y = 4, \
|
|
.grid_resolution_z = 4, \
|
|
.grid_bake_samples = 2048, \
|
|
.grid_normal_bias = 0.3f, \
|
|
.grid_view_bias = 0.0f, \
|
|
.grid_facing_bias = 0.5f, \
|
|
.surfel_density = 1.0f, \
|
|
.distinf = 2.5f, \
|
|
.distpar = 2.5f, \
|
|
.falloff = 0.2f, \
|
|
.clipsta = 0.8f, \
|
|
.clipend = 40.0f, \
|
|
.vis_bias = 1.0f, \
|
|
.vis_blur = 0.2f, \
|
|
.intensity = 1.0f, \
|
|
.flag = LIGHTPROBE_FLAG_SHOW_INFLUENCE, \
|
|
.resolution = LIGHT_PROBE_RESOLUTION_1024, \
|
|
}
|
|
|
|
/** \} */
|
|
|
|
/* clang-format on */
|