EEVEE: remove DNA/RNA for values that are no longer in use
Remove values from EEVEE which are no longer used. Ref !129832
This commit is contained in:
@@ -3064,14 +3064,6 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
}
|
||||
}
|
||||
|
||||
if (!DNA_struct_member_exists(fd->filesdna, "Light", "float", "contact_dist")) {
|
||||
LISTBASE_FOREACH (Light *, la, &bmain->lights) {
|
||||
la->contact_dist = 0.2f;
|
||||
la->contact_bias = 0.03f;
|
||||
la->contact_thickness = 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
if (!DNA_struct_member_exists(fd->filesdna, "LightProbe", "float", "vis_bias")) {
|
||||
LISTBASE_FOREACH (LightProbe *, probe, &bmain->lightprobes) {
|
||||
probe->vis_bias = 1.0f;
|
||||
@@ -3440,15 +3432,6 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
scene->eevee.taa_samples = 16;
|
||||
scene->eevee.taa_render_samples = 64;
|
||||
|
||||
scene->eevee.sss_samples = 7;
|
||||
scene->eevee.sss_jitter_threshold = 0.3f;
|
||||
|
||||
scene->eevee.ssr_quality = 0.25f;
|
||||
scene->eevee.ssr_max_roughness = 0.5f;
|
||||
scene->eevee.ssr_thickness = 0.2f;
|
||||
scene->eevee.ssr_border_fade = 0.075f;
|
||||
scene->eevee.ssr_firefly_fac = 10.0f;
|
||||
|
||||
scene->eevee.volumetric_start = 0.1f;
|
||||
scene->eevee.volumetric_end = 100.0f;
|
||||
scene->eevee.volumetric_tile_size = 8;
|
||||
@@ -3458,29 +3441,17 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
scene->eevee.volumetric_shadow_samples = 16;
|
||||
|
||||
scene->eevee.gtao_distance = 0.2f;
|
||||
scene->eevee.gtao_factor = 1.0f;
|
||||
scene->eevee.gtao_quality = 0.25f;
|
||||
|
||||
scene->eevee.bokeh_max_size = 100.0f;
|
||||
scene->eevee.bokeh_threshold = 1.0f;
|
||||
|
||||
copy_v3_fl(scene->eevee.bloom_color, 1.0f);
|
||||
scene->eevee.bloom_threshold = 0.8f;
|
||||
scene->eevee.bloom_knee = 0.5f;
|
||||
scene->eevee.bloom_intensity = 0.05f;
|
||||
scene->eevee.bloom_radius = 6.5f;
|
||||
scene->eevee.bloom_clamp = 0.0f;
|
||||
|
||||
scene->eevee.motion_blur_samples = 8;
|
||||
scene->eevee.motion_blur_shutter_deprecated = 0.5f;
|
||||
|
||||
scene->eevee.shadow_method = SHADOW_ESM;
|
||||
scene->eevee.shadow_cube_size = 512;
|
||||
scene->eevee.shadow_cascade_size = 1024;
|
||||
scene->eevee.shadow_cube_size_deprecated = 512;
|
||||
|
||||
scene->eevee.flag = SCE_EEVEE_VOLUMETRIC_LIGHTS | SCE_EEVEE_GTAO_BENT_NORMALS |
|
||||
SCE_EEVEE_GTAO_BOUNCE | SCE_EEVEE_TAA_REPROJECTION |
|
||||
SCE_EEVEE_SSR_HALF_RESOLUTION;
|
||||
scene->eevee.flag = SCE_EEVEE_TAA_REPROJECTION;
|
||||
|
||||
/* If the file is pre-2.80 move on. */
|
||||
if (scene->layer_properties == nullptr) {
|
||||
@@ -3536,21 +3507,21 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
IDProperty *props = IDP_GetPropertyFromGroup(scene->layer_properties,
|
||||
RE_engine_id_BLENDER_EEVEE);
|
||||
// EEVEE_GET_BOOL(props, volumetric_enable, SCE_EEVEE_VOLUMETRIC_ENABLED);
|
||||
EEVEE_GET_BOOL(props, volumetric_lights, SCE_EEVEE_VOLUMETRIC_LIGHTS);
|
||||
EEVEE_GET_BOOL(props, volumetric_shadows, SCE_EEVEE_VOLUMETRIC_SHADOWS);
|
||||
// EEVEE_GET_BOOL(props, volumetric_lights, SCE_EEVEE_VOLUMETRIC_LIGHTS);
|
||||
// EEVEE_GET_BOOL(props, volumetric_shadows, SCE_EEVEE_VOLUMETRIC_SHADOWS);
|
||||
EEVEE_GET_BOOL(props, gtao_enable, SCE_EEVEE_GTAO_ENABLED);
|
||||
EEVEE_GET_BOOL(props, gtao_use_bent_normals, SCE_EEVEE_GTAO_BENT_NORMALS);
|
||||
EEVEE_GET_BOOL(props, gtao_bounce, SCE_EEVEE_GTAO_BOUNCE);
|
||||
// EEVEE_GET_BOOL(props, gtao_use_bent_normals, SCE_EEVEE_GTAO_BENT_NORMALS);
|
||||
// EEVEE_GET_BOOL(props, gtao_bounce, SCE_EEVEE_GTAO_BOUNCE);
|
||||
EEVEE_GET_BOOL(props, dof_enable, SCE_EEVEE_DOF_ENABLED);
|
||||
// EEVEE_GET_BOOL(props, bloom_enable, SCE_EEVEE_BLOOM_ENABLED);
|
||||
EEVEE_GET_BOOL(props, motion_blur_enable, SCE_EEVEE_MOTION_BLUR_ENABLED_DEPRECATED);
|
||||
EEVEE_GET_BOOL(props, shadow_high_bitdepth, SCE_EEVEE_SHADOW_HIGH_BITDEPTH);
|
||||
// EEVEE_GET_BOOL(props, shadow_high_bitdepth, SCE_EEVEE_SHADOW_HIGH_BITDEPTH);
|
||||
EEVEE_GET_BOOL(props, taa_reprojection, SCE_EEVEE_TAA_REPROJECTION);
|
||||
// EEVEE_GET_BOOL(props, sss_enable, SCE_EEVEE_SSS_ENABLED);
|
||||
// EEVEE_GET_BOOL(props, sss_separate_albedo, SCE_EEVEE_SSS_SEPARATE_ALBEDO);
|
||||
EEVEE_GET_BOOL(props, ssr_enable, SCE_EEVEE_SSR_ENABLED);
|
||||
EEVEE_GET_BOOL(props, ssr_refraction, SCE_EEVEE_SSR_REFRACTION);
|
||||
EEVEE_GET_BOOL(props, ssr_halfres, SCE_EEVEE_SSR_HALF_RESOLUTION);
|
||||
// EEVEE_GET_BOOL(props, ssr_refraction, SCE_EEVEE_SSR_REFRACTION);
|
||||
// EEVEE_GET_BOOL(props, ssr_halfres, SCE_EEVEE_SSR_HALF_RESOLUTION);
|
||||
|
||||
EEVEE_GET_INT(props, gi_diffuse_bounces);
|
||||
EEVEE_GET_INT(props, gi_diffuse_bounces);
|
||||
@@ -3560,14 +3531,14 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
EEVEE_GET_INT(props, taa_samples);
|
||||
EEVEE_GET_INT(props, taa_render_samples);
|
||||
|
||||
EEVEE_GET_INT(props, sss_samples);
|
||||
EEVEE_GET_FLOAT(props, sss_jitter_threshold);
|
||||
// EEVEE_GET_INT(props, sss_samples);
|
||||
// EEVEE_GET_FLOAT(props, sss_jitter_threshold);
|
||||
|
||||
EEVEE_GET_FLOAT(props, ssr_quality);
|
||||
EEVEE_GET_FLOAT(props, ssr_max_roughness);
|
||||
EEVEE_GET_FLOAT(props, ssr_thickness);
|
||||
EEVEE_GET_FLOAT(props, ssr_border_fade);
|
||||
EEVEE_GET_FLOAT(props, ssr_firefly_fac);
|
||||
// EEVEE_GET_FLOAT(props, ssr_quality);
|
||||
// EEVEE_GET_FLOAT(props, ssr_max_roughness);
|
||||
// EEVEE_GET_FLOAT(props, ssr_thickness);
|
||||
// EEVEE_GET_FLOAT(props, ssr_border_fade);
|
||||
// EEVEE_GET_FLOAT(props, ssr_firefly_fac);
|
||||
|
||||
EEVEE_GET_FLOAT(props, volumetric_start);
|
||||
EEVEE_GET_FLOAT(props, volumetric_end);
|
||||
@@ -3577,26 +3548,26 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
EEVEE_GET_FLOAT(props, volumetric_light_clamp);
|
||||
EEVEE_GET_INT(props, volumetric_shadow_samples);
|
||||
|
||||
EEVEE_GET_FLOAT(props, gtao_distance);
|
||||
EEVEE_GET_FLOAT(props, gtao_factor);
|
||||
// EEVEE_GET_FLOAT(props, gtao_distance);
|
||||
// EEVEE_GET_FLOAT(props, gtao_factor);
|
||||
EEVEE_GET_FLOAT(props, gtao_quality);
|
||||
|
||||
EEVEE_GET_FLOAT(props, bokeh_max_size);
|
||||
EEVEE_GET_FLOAT(props, bokeh_threshold);
|
||||
|
||||
EEVEE_GET_FLOAT_ARRAY(props, bloom_color, 3);
|
||||
EEVEE_GET_FLOAT(props, bloom_threshold);
|
||||
EEVEE_GET_FLOAT(props, bloom_knee);
|
||||
EEVEE_GET_FLOAT(props, bloom_intensity);
|
||||
EEVEE_GET_FLOAT(props, bloom_radius);
|
||||
EEVEE_GET_FLOAT(props, bloom_clamp);
|
||||
// EEVEE_GET_FLOAT_ARRAY(props, bloom_color, 3);
|
||||
// EEVEE_GET_FLOAT(props, bloom_threshold);
|
||||
// EEVEE_GET_FLOAT(props, bloom_knee);
|
||||
// EEVEE_GET_FLOAT(props, bloom_intensity);
|
||||
// EEVEE_GET_FLOAT(props, bloom_radius);
|
||||
// EEVEE_GET_FLOAT(props, bloom_clamp);
|
||||
|
||||
EEVEE_GET_INT(props, motion_blur_samples);
|
||||
EEVEE_GET_FLOAT(props, motion_blur_shutter_deprecated);
|
||||
|
||||
EEVEE_GET_INT(props, shadow_method);
|
||||
EEVEE_GET_INT(props, shadow_cube_size);
|
||||
EEVEE_GET_INT(props, shadow_cascade_size);
|
||||
// EEVEE_GET_INT(props, shadow_method);
|
||||
EEVEE_GET_INT(props, shadow_cube_size_deprecated);
|
||||
// EEVEE_GET_INT(props, shadow_cascade_size);
|
||||
|
||||
/* Cleanup. */
|
||||
IDP_FreeProperty(scene->layer_properties);
|
||||
@@ -3882,13 +3853,6 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
}
|
||||
}
|
||||
|
||||
if (!DNA_struct_member_exists(fd->filesdna, "SceneEEVEE", "float", "gi_cubemap_draw_size")) {
|
||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||
scene->eevee.gi_irradiance_draw_size = 0.1f;
|
||||
scene->eevee.gi_cubemap_draw_size = 0.3f;
|
||||
}
|
||||
}
|
||||
|
||||
if (!DNA_struct_member_exists(
|
||||
fd->filesdna, "RigidBodyWorld", "RigidBodyWorld_Shared", "*shared"))
|
||||
{
|
||||
@@ -4345,22 +4309,9 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
}
|
||||
}
|
||||
|
||||
if (!DNA_struct_member_exists(fd->filesdna, "SceneEEVEE", "float", "gi_irradiance_smoothing"))
|
||||
{
|
||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||
scene->eevee.gi_irradiance_smoothing = 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
if (!DNA_struct_member_exists(fd->filesdna, "SceneEEVEE", "float", "gi_filter_quality")) {
|
||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||
scene->eevee.gi_filter_quality = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (!DNA_struct_member_exists(fd->filesdna, "Light", "float", "att_dist")) {
|
||||
LISTBASE_FOREACH (Light *, la, &bmain->lights) {
|
||||
la->att_dist = la->clipend;
|
||||
la->att_dist = la->clipend_deprecated;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5857,15 +5808,6 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* EEVEE: Cascade shadow bias fix */
|
||||
LISTBASE_FOREACH (Light *, light, &bmain->lights) {
|
||||
if (light->type == LA_SUN) {
|
||||
/* Should be 0.0004 but for practical reason we make it bigger.
|
||||
* Correct factor is scene dependent. */
|
||||
light->bias *= 0.002f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 5)) {
|
||||
|
||||
@@ -1773,7 +1773,6 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
if (!DNA_struct_member_exists(fd->filesdna, "SceneEEVEE", "float", "bokeh_overblur")) {
|
||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||
scene->eevee.bokeh_neighbor_max = 10.0f;
|
||||
scene->eevee.bokeh_denoise_fac = 0.75f;
|
||||
scene->eevee.bokeh_overblur = 5.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4379,7 +4379,7 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
bool shadow_resolution_absolute = false;
|
||||
/* Try to get default resolution from scene setting. */
|
||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||
shadow_max_res_local = (2.0f * M_SQRT2) / scene->eevee.shadow_cube_size;
|
||||
shadow_max_res_local = (2.0f * M_SQRT2) / scene->eevee.shadow_cube_size_deprecated;
|
||||
/* Round to avoid weird numbers in the UI. */
|
||||
shadow_max_res_local = ceil(shadow_max_res_local * 1000.0f) / 1000.0f;
|
||||
shadow_resolution_absolute = true;
|
||||
|
||||
@@ -365,20 +365,12 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene)
|
||||
}
|
||||
|
||||
/* New EEVEE defaults. */
|
||||
scene->eevee.bloom_intensity = 0.05f;
|
||||
scene->eevee.bloom_clamp = 0.0f;
|
||||
scene->eevee.motion_blur_shutter_deprecated = 0.5f;
|
||||
|
||||
copy_v3_v3(scene->display.light_direction, blender::float3(M_SQRT1_3));
|
||||
copy_v2_fl2(scene->safe_areas.title, 0.1f, 0.05f);
|
||||
copy_v2_fl2(scene->safe_areas.action, 0.035f, 0.035f);
|
||||
|
||||
/* Change default cube-map quality. */
|
||||
scene->eevee.gi_filter_quality = 3.0f;
|
||||
|
||||
/* Enable Soft Shadows by default. */
|
||||
scene->eevee.flag |= SCE_EEVEE_SHADOW_SOFT;
|
||||
|
||||
/* Default Rotate Increment. */
|
||||
const float default_snap_angle_increment = DEG2RADF(5.0f);
|
||||
scene->toolsettings->snap_angle_increment_2d = default_snap_angle_increment;
|
||||
|
||||
@@ -220,10 +220,6 @@ char *GPU_material_split_sub_function(GPUMaterial *material,
|
||||
GPUNodeLink **link);
|
||||
|
||||
bool GPU_material_sss_profile_create(GPUMaterial *material, float radii[3]);
|
||||
GPUUniformBuf *GPU_material_sss_profile_get(GPUMaterial *material,
|
||||
int sample_len,
|
||||
GPUTexture **tex_profile);
|
||||
|
||||
/**
|
||||
* High level functions to create and use GPU materials.
|
||||
*/
|
||||
@@ -319,7 +315,6 @@ GPUUniformBuf *GPU_material_uniform_buffer_get(GPUMaterial *material);
|
||||
* \param inputs: Items are #LinkData, data is #GPUInput (`BLI_genericNodeN(GPUInput)`).
|
||||
*/
|
||||
void GPU_material_uniform_buffer_create(GPUMaterial *material, ListBase *inputs);
|
||||
GPUUniformBuf *GPU_material_create_sss_profile_ubo();
|
||||
|
||||
bool GPU_material_has_surface_output(GPUMaterial *mat);
|
||||
bool GPU_material_has_volume_output(GPUMaterial *mat);
|
||||
|
||||
@@ -138,8 +138,6 @@ struct GPUMaterial {
|
||||
GPUTexture *sss_tex_profile; /* Texture containing SSS profile. */
|
||||
bool sss_enabled;
|
||||
float sss_radii[3];
|
||||
int sss_samples;
|
||||
bool sss_dirty;
|
||||
|
||||
uint32_t refcount;
|
||||
|
||||
@@ -391,196 +389,6 @@ struct GPUSssKernelData {
|
||||
|
||||
BLI_STATIC_ASSERT_ALIGN(GPUSssKernelData, 16)
|
||||
|
||||
static void sss_calculate_offsets(GPUSssKernelData *kd, int count, float exponent)
|
||||
{
|
||||
float step = 2.0f / float(count - 1);
|
||||
for (int i = 0; i < count; i++) {
|
||||
float o = float(i) * step - 1.0f;
|
||||
float sign = (o < 0.0f) ? -1.0f : 1.0f;
|
||||
float ofs = sign * fabsf(powf(o, exponent));
|
||||
kd->kernel[i][3] = ofs;
|
||||
}
|
||||
}
|
||||
|
||||
# define BURLEY_TRUNCATE 16.0f
|
||||
# define BURLEY_TRUNCATE_CDF 0.9963790093708328f // cdf(BURLEY_TRUNCATE)
|
||||
static float burley_profile(float r, float d)
|
||||
{
|
||||
float exp_r_3_d = expf(-r / (3.0f * d));
|
||||
float exp_r_d = exp_r_3_d * exp_r_3_d * exp_r_3_d;
|
||||
return (exp_r_d + exp_r_3_d) / (4.0f * d);
|
||||
}
|
||||
|
||||
static float eval_profile(float r, float param)
|
||||
{
|
||||
r = fabsf(r);
|
||||
return burley_profile(r, param) / BURLEY_TRUNCATE_CDF;
|
||||
}
|
||||
|
||||
/* Resolution for each sample of the precomputed kernel profile */
|
||||
# define INTEGRAL_RESOLUTION 32
|
||||
static float eval_integral(float x0, float x1, float param)
|
||||
{
|
||||
const float range = x1 - x0;
|
||||
const float step = range / INTEGRAL_RESOLUTION;
|
||||
float integral = 0.0f;
|
||||
|
||||
for (int i = 0; i < INTEGRAL_RESOLUTION; i++) {
|
||||
float x = x0 + range * (float(i) + 0.5f) / float(INTEGRAL_RESOLUTION);
|
||||
float y = eval_profile(x, param);
|
||||
integral += y * step;
|
||||
}
|
||||
|
||||
return integral;
|
||||
}
|
||||
# undef INTEGRAL_RESOLUTION
|
||||
|
||||
static void compute_sss_kernel(GPUSssKernelData *kd, const float radii[3], int sample_len)
|
||||
{
|
||||
float rad[3];
|
||||
/* Minimum radius */
|
||||
rad[0] = std::max(radii[0], 1e-15f);
|
||||
rad[1] = std::max(radii[1], 1e-15f);
|
||||
rad[2] = std::max(radii[2], 1e-15f);
|
||||
|
||||
kd->avg_inv_radius = 3.0f / (rad[0] + rad[1] + rad[2]);
|
||||
|
||||
/* Christensen-Burley fitting */
|
||||
float l[3], d[3];
|
||||
|
||||
mul_v3_v3fl(l, rad, 0.25f * M_1_PI);
|
||||
const float A = 1.0f;
|
||||
const float s = 1.9f - A + 3.5f * (A - 0.8f) * (A - 0.8f);
|
||||
/* XXX 0.6f Out of nowhere to match cycles! Empirical! Can be tweak better. */
|
||||
mul_v3_v3fl(d, l, 0.6f / s);
|
||||
mul_v3_v3fl(rad, d, BURLEY_TRUNCATE);
|
||||
kd->max_radius = std::max({rad[0], rad[1], rad[2]});
|
||||
|
||||
copy_v3_v3(kd->param, d);
|
||||
|
||||
/* Compute samples locations on the 1d kernel [-1..1] */
|
||||
sss_calculate_offsets(kd, sample_len, SSS_EXPONENT);
|
||||
|
||||
/* Weights sum for normalization */
|
||||
float sum[3] = {0.0f, 0.0f, 0.0f};
|
||||
|
||||
/* Compute integral of each sample footprint */
|
||||
for (int i = 0; i < sample_len; i++) {
|
||||
float x0, x1;
|
||||
|
||||
if (i == 0) {
|
||||
x0 = kd->kernel[0][3] - fabsf(kd->kernel[0][3] - kd->kernel[1][3]) / 2.0f;
|
||||
}
|
||||
else {
|
||||
x0 = (kd->kernel[i - 1][3] + kd->kernel[i][3]) / 2.0f;
|
||||
}
|
||||
|
||||
if (i == sample_len - 1) {
|
||||
x1 = kd->kernel[sample_len - 1][3] +
|
||||
fabsf(kd->kernel[sample_len - 2][3] - kd->kernel[sample_len - 1][3]) / 2.0f;
|
||||
}
|
||||
else {
|
||||
x1 = (kd->kernel[i][3] + kd->kernel[i + 1][3]) / 2.0f;
|
||||
}
|
||||
|
||||
x0 *= kd->max_radius;
|
||||
x1 *= kd->max_radius;
|
||||
|
||||
kd->kernel[i][0] = eval_integral(x0, x1, kd->param[0]);
|
||||
kd->kernel[i][1] = eval_integral(x0, x1, kd->param[1]);
|
||||
kd->kernel[i][2] = eval_integral(x0, x1, kd->param[2]);
|
||||
|
||||
sum[0] += kd->kernel[i][0];
|
||||
sum[1] += kd->kernel[i][1];
|
||||
sum[2] += kd->kernel[i][2];
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (sum[i] > 0.0f) {
|
||||
/* Normalize */
|
||||
for (int j = 0; j < sample_len; j++) {
|
||||
kd->kernel[j][i] /= sum[i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Avoid 0 kernel sum. */
|
||||
kd->kernel[sample_len / 2][i] = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
/* Put center sample at the start of the array (to sample first) */
|
||||
float tmpv[4];
|
||||
copy_v4_v4(tmpv, kd->kernel[sample_len / 2]);
|
||||
for (int i = sample_len / 2; i > 0; i--) {
|
||||
copy_v4_v4(kd->kernel[i], kd->kernel[i - 1]);
|
||||
}
|
||||
copy_v4_v4(kd->kernel[0], tmpv);
|
||||
|
||||
kd->samples = sample_len;
|
||||
}
|
||||
|
||||
# define INTEGRAL_RESOLUTION 512
|
||||
static void compute_sss_translucence_kernel(const GPUSssKernelData *kd,
|
||||
int resolution,
|
||||
float **output)
|
||||
{
|
||||
float(*texels)[4];
|
||||
texels = static_cast<float(*)[4]>(
|
||||
MEM_callocN(sizeof(float[4]) * resolution, "compute_sss_translucence_kernel"));
|
||||
*output = (float *)texels;
|
||||
|
||||
/* Last texel should be black, hence the - 1. */
|
||||
for (int i = 0; i < resolution - 1; i++) {
|
||||
/* Distance from surface. */
|
||||
float d = kd->max_radius * (float(i) + 0.00001f) / float(resolution);
|
||||
|
||||
/* For each distance d we compute the radiance incoming from an hypothetical parallel plane. */
|
||||
/* Compute radius of the footprint on the hypothetical plane. */
|
||||
float r_fp = sqrtf(kd->max_radius * kd->max_radius - d * d);
|
||||
float r_step = r_fp / INTEGRAL_RESOLUTION;
|
||||
float area_accum = 0.0f;
|
||||
for (float r = 0.0f; r < r_fp; r += r_step) {
|
||||
/* Compute distance to the "shading" point through the medium. */
|
||||
/* r_step * 0.5f to put sample between the area borders */
|
||||
float dist = hypotf(r + r_step * 0.5f, d);
|
||||
|
||||
float profile[3];
|
||||
profile[0] = eval_profile(dist, kd->param[0]);
|
||||
profile[1] = eval_profile(dist, kd->param[1]);
|
||||
profile[2] = eval_profile(dist, kd->param[2]);
|
||||
|
||||
/* Since the profile and configuration are radially symmetrical we
|
||||
* can just evaluate it once and weight it accordingly */
|
||||
float r_next = r + r_step;
|
||||
float disk_area = (M_PI * r_next * r_next) - (M_PI * r * r);
|
||||
|
||||
mul_v3_fl(profile, disk_area);
|
||||
add_v3_v3(texels[i], profile);
|
||||
area_accum += disk_area;
|
||||
}
|
||||
/* Normalize over the disk. */
|
||||
mul_v3_fl(texels[i], 1.0f / (area_accum));
|
||||
}
|
||||
|
||||
/* Normalize */
|
||||
for (int j = resolution - 2; j > 0; j--) {
|
||||
texels[j][0] /= (texels[0][0] > 0.0f) ? texels[0][0] : 1.0f;
|
||||
texels[j][1] /= (texels[0][1] > 0.0f) ? texels[0][1] : 1.0f;
|
||||
texels[j][2] /= (texels[0][2] > 0.0f) ? texels[0][2] : 1.0f;
|
||||
}
|
||||
|
||||
/* First texel should be white */
|
||||
texels[0][0] = (texels[0][0] > 0.0f) ? 1.0f : 0.0f;
|
||||
texels[0][1] = (texels[0][1] > 0.0f) ? 1.0f : 0.0f;
|
||||
texels[0][2] = (texels[0][2] > 0.0f) ? 1.0f : 0.0f;
|
||||
|
||||
/* dim the last few texels for smoother transition */
|
||||
mul_v3_fl(texels[resolution - 2], 0.25f);
|
||||
mul_v3_fl(texels[resolution - 3], 0.5f);
|
||||
mul_v3_fl(texels[resolution - 4], 0.75f);
|
||||
}
|
||||
# undef INTEGRAL_RESOLUTION
|
||||
|
||||
bool GPU_material_sss_profile_create(GPUMaterial *material, float radii[3])
|
||||
{
|
||||
/* Enable only once. */
|
||||
@@ -588,7 +396,6 @@ bool GPU_material_sss_profile_create(GPUMaterial *material, float radii[3])
|
||||
return false;
|
||||
}
|
||||
copy_v3_v3(material->sss_radii, radii);
|
||||
material->sss_dirty = true;
|
||||
material->sss_enabled = true;
|
||||
|
||||
/* Update / Create UBO */
|
||||
@@ -598,54 +405,6 @@ bool GPU_material_sss_profile_create(GPUMaterial *material, float radii[3])
|
||||
return true;
|
||||
}
|
||||
|
||||
GPUUniformBuf *GPU_material_sss_profile_get(GPUMaterial *material,
|
||||
int sample_len,
|
||||
GPUTexture **tex_profile)
|
||||
{
|
||||
if (!material->sss_enabled) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (material->sss_dirty || (material->sss_samples != sample_len)) {
|
||||
GPUSssKernelData kd;
|
||||
|
||||
compute_sss_kernel(&kd, material->sss_radii, sample_len);
|
||||
|
||||
/* Update / Create UBO */
|
||||
GPU_uniformbuf_update(material->sss_profile, &kd);
|
||||
|
||||
/* Update / Create Tex */
|
||||
float *translucence_profile;
|
||||
compute_sss_translucence_kernel(&kd, 64, &translucence_profile);
|
||||
|
||||
if (material->sss_tex_profile != nullptr) {
|
||||
GPU_texture_free(material->sss_tex_profile);
|
||||
}
|
||||
|
||||
material->sss_tex_profile = GPU_texture_create_1d("sss_tex_profile",
|
||||
64,
|
||||
1,
|
||||
GPU_RGBA16F,
|
||||
GPU_TEXTURE_USAGE_SHADER_READ,
|
||||
translucence_profile);
|
||||
|
||||
MEM_freeN(translucence_profile);
|
||||
|
||||
material->sss_samples = sample_len;
|
||||
material->sss_dirty = false;
|
||||
}
|
||||
|
||||
if (tex_profile != nullptr) {
|
||||
*tex_profile = material->sss_tex_profile;
|
||||
}
|
||||
return material->sss_profile;
|
||||
}
|
||||
|
||||
GPUUniformBuf *GPU_material_create_sss_profile_ubo()
|
||||
{
|
||||
return GPU_uniformbuf_create(sizeof(GPUSssKernelData));
|
||||
}
|
||||
|
||||
# undef SSS_EXPONENT
|
||||
# undef SSS_SAMPLES
|
||||
#endif
|
||||
|
||||
@@ -1009,16 +1009,12 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light)
|
||||
et->setData("red", &(lamp->r));
|
||||
et->setData("green", &(lamp->g));
|
||||
et->setData("blue", &(lamp->b));
|
||||
et->setData("shadow_r", &(lamp->shdwr));
|
||||
et->setData("shadow_g", &(lamp->shdwg));
|
||||
et->setData("shadow_b", &(lamp->shdwb));
|
||||
et->setData("energy", &(lamp->energy));
|
||||
et->setData("spotsize", &(lamp->spotsize));
|
||||
lamp->spotsize = DEG2RADF(lamp->spotsize);
|
||||
et->setData("spotblend", &(lamp->spotblend));
|
||||
et->setData("clipsta", &(lamp->clipsta));
|
||||
et->setData("clipend", &(lamp->clipend));
|
||||
et->setData("bias", &(lamp->bias));
|
||||
et->setData("clipend", &(lamp->att_dist));
|
||||
et->setData("radius", &(lamp->radius));
|
||||
et->setData("area_shape", &(lamp->area_shape));
|
||||
et->setData("area_size", &(lamp->area_size));
|
||||
|
||||
@@ -90,15 +90,11 @@ bool LightsExporter::exportBlenderProfile(COLLADASW::Light &cla, Light *la)
|
||||
cla.addExtraTechniqueParameter("blender", "red", la->r);
|
||||
cla.addExtraTechniqueParameter("blender", "green", la->g);
|
||||
cla.addExtraTechniqueParameter("blender", "blue", la->b);
|
||||
cla.addExtraTechniqueParameter("blender", "shadow_r", la->shdwr, "blender_shadow_r");
|
||||
cla.addExtraTechniqueParameter("blender", "shadow_g", la->shdwg, "blender_shadow_g");
|
||||
cla.addExtraTechniqueParameter("blender", "shadow_b", la->shdwb, "blender_shadow_b");
|
||||
cla.addExtraTechniqueParameter("blender", "energy", la->energy, "blender_energy");
|
||||
cla.addExtraTechniqueParameter("blender", "spotsize", RAD2DEGF(la->spotsize));
|
||||
cla.addExtraTechniqueParameter("blender", "spotblend", la->spotblend);
|
||||
cla.addExtraTechniqueParameter("blender", "clipsta", la->clipsta);
|
||||
cla.addExtraTechniqueParameter("blender", "clipend", la->clipend);
|
||||
cla.addExtraTechniqueParameter("blender", "bias", la->bias);
|
||||
cla.addExtraTechniqueParameter("blender", "clipend", la->att_dist);
|
||||
cla.addExtraTechniqueParameter("blender", "radius", la->radius);
|
||||
cla.addExtraTechniqueParameter("blender", "area_shape", la->area_shape);
|
||||
cla.addExtraTechniqueParameter("blender", "area_size", la->area_size);
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
.spotblend = 0.15f, \
|
||||
.mode = LA_SHADOW | LA_USE_SOFT_FALLOFF, \
|
||||
.clipsta = 0.05f, \
|
||||
.clipend = 40.0f, \
|
||||
.bias = 1.0f, \
|
||||
.area_size = 0.25f, \
|
||||
.area_sizey = 0.25f, \
|
||||
.area_sizez = 0.25f, \
|
||||
@@ -35,9 +33,6 @@
|
||||
.cascade_count = 4, \
|
||||
.cascade_exponent = 0.8f, \
|
||||
.cascade_fade = 0.1f, \
|
||||
.contact_dist = 0.2f, \
|
||||
.contact_bias = 0.03f, \
|
||||
.contact_thickness = 0.2f, \
|
||||
.diff_fac = 1.0f, \
|
||||
.spec_fac = 1.0f, \
|
||||
.transmission_fac = 1.0f, \
|
||||
|
||||
@@ -52,26 +52,18 @@ typedef struct Light {
|
||||
/* Sun light. */
|
||||
float sun_angle;
|
||||
|
||||
/* Shadow color. */
|
||||
float shdwr, shdwg, shdwb;
|
||||
|
||||
/* Nodes. */
|
||||
short pr_texture, use_nodes;
|
||||
|
||||
/* Eevee */
|
||||
float bias;
|
||||
float clipsta;
|
||||
float clipend;
|
||||
float clipend_deprecated;
|
||||
|
||||
float cascade_max_dist;
|
||||
float cascade_exponent;
|
||||
float cascade_fade;
|
||||
int cascade_count;
|
||||
|
||||
float contact_dist;
|
||||
float contact_bias;
|
||||
float contact_thickness;
|
||||
|
||||
float diff_fac;
|
||||
float spec_fac;
|
||||
float transmission_fac;
|
||||
@@ -81,7 +73,6 @@ typedef struct Light {
|
||||
float shadow_filter_radius;
|
||||
float shadow_maximum_resolution;
|
||||
float shadow_jitter_overblur;
|
||||
char _pad3[4];
|
||||
|
||||
/* Preview */
|
||||
struct PreviewImage *preview;
|
||||
@@ -141,7 +132,7 @@ enum {
|
||||
// LA_SHAD_TEX = 1 << 16, /* Deprecated. */
|
||||
LA_SHOW_CONE = 1 << 17,
|
||||
// LA_SHOW_SHADOW_BOX = 1 << 18,
|
||||
LA_SHAD_CONTACT = 1 << 19,
|
||||
// LA_SHAD_CONTACT = 1 << 19, /* Deprecated. */
|
||||
LA_CUSTOM_ATTENUATION = 1 << 20,
|
||||
LA_USE_SOFT_FALLOFF = 1 << 21,
|
||||
/** Use absolute resolution clamping instead of relative. */
|
||||
|
||||
@@ -179,24 +179,11 @@
|
||||
.gi_diffuse_bounces = 3, \
|
||||
.gi_cubemap_resolution = 512, \
|
||||
.gi_visibility_resolution = 32, \
|
||||
.gi_cubemap_draw_size = 0.3f, \
|
||||
.gi_irradiance_draw_size = 0.1f, \
|
||||
.gi_irradiance_smoothing = 0.1f, \
|
||||
.gi_filter_quality = 3.0f, \
|
||||
.gi_irradiance_pool_size = 16, \
|
||||
.shadow_pool_size = 512, \
|
||||
\
|
||||
.taa_samples = 16, \
|
||||
.taa_render_samples = 64, \
|
||||
\
|
||||
.sss_samples = 7, \
|
||||
.sss_jitter_threshold = 0.3f, \
|
||||
\
|
||||
.ssr_quality = 0.25f, \
|
||||
.ssr_max_roughness = 0.5f, \
|
||||
.ssr_thickness = 0.2f, \
|
||||
.ssr_border_fade = 0.075f, \
|
||||
.ssr_firefly_fac = 10.0f, \
|
||||
\
|
||||
.volumetric_start = 0.1f, \
|
||||
.volumetric_end = 100.0f, \
|
||||
@@ -208,7 +195,6 @@
|
||||
.volumetric_shadow_samples = 16, \
|
||||
\
|
||||
.gtao_distance = 0.2f, \
|
||||
.gtao_factor = 1.0f, \
|
||||
.gtao_quality = 0.25f, \
|
||||
.gtao_thickness = 0.5f, \
|
||||
.gtao_focus = 0.05f, \
|
||||
@@ -225,14 +211,6 @@
|
||||
.bokeh_max_size = 100.0f, \
|
||||
.bokeh_threshold = 1.0f, \
|
||||
.bokeh_neighbor_max = 10.0f, \
|
||||
.bokeh_denoise_fac = 0.75f, \
|
||||
\
|
||||
.bloom_color = {1.0f, 1.0f, 1.0f}, \
|
||||
.bloom_threshold = 0.8f, \
|
||||
.bloom_knee = 0.5f, \
|
||||
.bloom_intensity = 0.05f, \
|
||||
.bloom_radius = 6.5f, \
|
||||
.bloom_clamp = 0.0f, \
|
||||
\
|
||||
.motion_blur_depth_scale = 100.0f, \
|
||||
.motion_blur_max = 32, \
|
||||
@@ -240,8 +218,6 @@
|
||||
\
|
||||
.clamp_surface_indirect = 10.0f, \
|
||||
\
|
||||
.shadow_cube_size = 512, \
|
||||
.shadow_cascade_size = 1024, \
|
||||
.shadow_ray_count = 1, \
|
||||
.shadow_step_count = 6, \
|
||||
.shadow_resolution_scale = 1.0f, \
|
||||
@@ -254,9 +230,7 @@
|
||||
\
|
||||
.overscan = 3.0f, \
|
||||
\
|
||||
.flag = SCE_EEVEE_VOLUMETRIC_LIGHTS | SCE_EEVEE_GTAO_BENT_NORMALS | \
|
||||
SCE_EEVEE_GTAO_BOUNCE | SCE_EEVEE_TAA_REPROJECTION | \
|
||||
SCE_EEVEE_SSR_HALF_RESOLUTION | SCE_EEVEE_SHADOW_SOFT, \
|
||||
.flag = SCE_EEVEE_TAA_REPROJECTION, \
|
||||
}
|
||||
|
||||
#define _DNA_DEFAULT_SceneHydra \
|
||||
|
||||
@@ -1886,24 +1886,12 @@ typedef struct SceneEEVEE {
|
||||
int gi_diffuse_bounces;
|
||||
int gi_cubemap_resolution;
|
||||
int gi_visibility_resolution;
|
||||
float gi_irradiance_smoothing;
|
||||
float gi_glossy_clamp;
|
||||
float gi_filter_quality;
|
||||
int gi_irradiance_pool_size;
|
||||
|
||||
float gi_cubemap_draw_size;
|
||||
float gi_irradiance_draw_size;
|
||||
char _pad0[4];
|
||||
|
||||
int taa_samples;
|
||||
int taa_render_samples;
|
||||
int sss_samples;
|
||||
float sss_jitter_threshold;
|
||||
|
||||
float ssr_quality;
|
||||
float ssr_max_roughness;
|
||||
float ssr_thickness;
|
||||
float ssr_border_fade;
|
||||
float ssr_firefly_fac;
|
||||
|
||||
float volumetric_start;
|
||||
float volumetric_end;
|
||||
@@ -1915,7 +1903,6 @@ typedef struct SceneEEVEE {
|
||||
int volumetric_ray_depth;
|
||||
|
||||
float gtao_distance;
|
||||
float gtao_factor;
|
||||
float gtao_quality;
|
||||
float gtao_thickness;
|
||||
float gtao_focus;
|
||||
@@ -1927,20 +1914,12 @@ typedef struct SceneEEVEE {
|
||||
float fast_gi_thickness_near;
|
||||
float fast_gi_thickness_far;
|
||||
char fast_gi_method;
|
||||
char _pad0[3];
|
||||
char _pad1[3];
|
||||
|
||||
float bokeh_overblur;
|
||||
float bokeh_max_size;
|
||||
float bokeh_threshold;
|
||||
float bokeh_neighbor_max;
|
||||
float bokeh_denoise_fac;
|
||||
|
||||
float bloom_color[3];
|
||||
float bloom_threshold;
|
||||
float bloom_knee;
|
||||
float bloom_intensity;
|
||||
float bloom_radius;
|
||||
float bloom_clamp;
|
||||
|
||||
int motion_blur_samples DNA_DEPRECATED;
|
||||
int motion_blur_max;
|
||||
@@ -1949,9 +1928,8 @@ typedef struct SceneEEVEE {
|
||||
float motion_blur_shutter_deprecated DNA_DEPRECATED;
|
||||
float motion_blur_depth_scale;
|
||||
|
||||
int shadow_method DNA_DEPRECATED;
|
||||
int shadow_cube_size;
|
||||
int shadow_cascade_size;
|
||||
/* Only keep for versioning. */
|
||||
int shadow_cube_size_deprecated DNA_DEPRECATED;
|
||||
int shadow_pool_size;
|
||||
int shadow_ray_count;
|
||||
int shadow_step_count;
|
||||
@@ -2889,28 +2867,28 @@ enum {
|
||||
/** #SceneEEVEE::flag */
|
||||
enum {
|
||||
// SCE_EEVEE_VOLUMETRIC_ENABLED = (1 << 0), /* Unused */
|
||||
SCE_EEVEE_VOLUMETRIC_LIGHTS = (1 << 1),
|
||||
// SCE_EEVEE_VOLUMETRIC_LIGHTS = (1 << 1), /* Unused. */
|
||||
SCE_EEVEE_VOLUMETRIC_SHADOWS = (1 << 2),
|
||||
// SCE_EEVEE_VOLUMETRIC_COLORED = (1 << 3), /* Unused */
|
||||
SCE_EEVEE_GTAO_ENABLED = (1 << 4),
|
||||
SCE_EEVEE_GTAO_BENT_NORMALS = (1 << 5),
|
||||
SCE_EEVEE_GTAO_BOUNCE = (1 << 6),
|
||||
// SCE_EEVEE_GTAO_BENT_NORMALS = (1 << 5), /* Unused. */
|
||||
// SCE_EEVEE_GTAO_BOUNCE = (1 << 6), /* Unused. */
|
||||
// SCE_EEVEE_DOF_ENABLED = (1 << 7), /* Moved to camera->dof.flag */
|
||||
// SCE_EEVEE_BLOOM_ENABLED = (1 << 8), /* Unused */
|
||||
SCE_EEVEE_MOTION_BLUR_ENABLED_DEPRECATED = (1 << 9), /* Moved to scene->r.mode */
|
||||
SCE_EEVEE_SHADOW_HIGH_BITDEPTH = (1 << 10),
|
||||
// SCE_EEVEE_SHADOW_HIGH_BITDEPTH = (1 << 10), /* Unused. */
|
||||
SCE_EEVEE_TAA_REPROJECTION = (1 << 11),
|
||||
// SCE_EEVEE_SSS_ENABLED = (1 << 12), /* Unused */
|
||||
// SCE_EEVEE_SSS_SEPARATE_ALBEDO = (1 << 13), /* Unused */
|
||||
SCE_EEVEE_SSR_ENABLED = (1 << 14),
|
||||
SCE_EEVEE_SSR_REFRACTION = (1 << 15),
|
||||
SCE_EEVEE_SSR_HALF_RESOLUTION = (1 << 16),
|
||||
SCE_EEVEE_SHOW_IRRADIANCE = (1 << 17),
|
||||
SCE_EEVEE_SHOW_CUBEMAPS = (1 << 18),
|
||||
// SCE_EEVEE_SSR_REFRACTION = (1 << 15), /* Unused. */
|
||||
// SCE_EEVEE_SSR_HALF_RESOLUTION = (1 << 16), /* Unused. */
|
||||
// SCE_EEVEE_SHOW_IRRADIANCE = (1 << 17), /* Unused. */
|
||||
// SCE_EEVEE_SHOW_CUBEMAPS = (1 << 18), /* Unused. */
|
||||
SCE_EEVEE_GI_AUTOBAKE = (1 << 19),
|
||||
SCE_EEVEE_SHADOW_SOFT = (1 << 20),
|
||||
// SCE_EEVEE_SHADOW_SOFT = (1 << 20), /* Unused. */
|
||||
SCE_EEVEE_OVERSCAN = (1 << 21),
|
||||
SCE_EEVEE_DOF_HQ_SLIGHT_FOCUS = (1 << 22),
|
||||
// SCE_EEVEE_DOF_HQ_SLIGHT_FOCUS = (1 << 22), /* Unused. */
|
||||
SCE_EEVEE_DOF_JITTER = (1 << 23),
|
||||
SCE_EEVEE_SHADOW_ENABLED = (1 << 24),
|
||||
SCE_EEVEE_RAYTRACE_OPTIONS_SPLIT = (1 << 25),
|
||||
@@ -2942,13 +2920,6 @@ typedef enum FastGI_Method {
|
||||
FAST_GI_AO_ONLY = 1,
|
||||
} FastGI_Method;
|
||||
|
||||
/** #SceneEEVEE::shadow_method */
|
||||
enum {
|
||||
SHADOW_ESM = 1,
|
||||
/* SHADOW_VSM = 2, */ /* UNUSED */
|
||||
/* SHADOW_METHOD_MAX = 3, */ /* UNUSED */
|
||||
};
|
||||
|
||||
/** #SceneDisplay->render_aa and #SceneDisplay->viewport_aa */
|
||||
enum {
|
||||
SCE_DISPLAY_AA_OFF = 0,
|
||||
|
||||
@@ -103,6 +103,7 @@ DNA_STRUCT_RENAME_MEMBER(HookModifierData, totindex, indexar_num)
|
||||
DNA_STRUCT_RENAME_MEMBER(Image, name, filepath)
|
||||
DNA_STRUCT_RENAME_MEMBER(LaplacianDeformModifierData, total_verts, verts_num)
|
||||
DNA_STRUCT_RENAME_MEMBER(Library, name, filepath)
|
||||
DNA_STRUCT_RENAME_MEMBER(Light, clipend, clipend_deprecated)
|
||||
DNA_STRUCT_RENAME_MEMBER(Light, energy, energy_deprecated)
|
||||
DNA_STRUCT_RENAME_MEMBER(Light, energy_new, energy)
|
||||
DNA_STRUCT_RENAME_MEMBER(LineartGpencilModifierData, line_types, edge_types)
|
||||
@@ -176,6 +177,7 @@ DNA_STRUCT_RENAME_MEMBER(SDefBind, numverts, verts_num)
|
||||
DNA_STRUCT_RENAME_MEMBER(SDefVert, numbinds, binds_num)
|
||||
DNA_STRUCT_RENAME_MEMBER(SceneEEVEE, motion_blur_position, motion_blur_position_deprecated)
|
||||
DNA_STRUCT_RENAME_MEMBER(SceneEEVEE, motion_blur_shutter, motion_blur_shutter_deprecated)
|
||||
DNA_STRUCT_RENAME_MEMBER(SceneEEVEE, shadow_cube_size, shadow_cube_size_deprecated)
|
||||
DNA_STRUCT_RENAME_MEMBER(Sequence, retiming_handle_num, retiming_keys_num)
|
||||
DNA_STRUCT_RENAME_MEMBER(Sequence, retiming_handles, retiming_keys)
|
||||
DNA_STRUCT_RENAME_MEMBER(SpaceImage, pixel_snap_mode, pixel_round_mode)
|
||||
|
||||
@@ -242,19 +242,6 @@ static void rna_def_light_shadow(StructRNA *srna, bool sun)
|
||||
"Shadow map clip start, below which objects will not generate shadows");
|
||||
RNA_def_property_update(prop, 0, "rna_Light_draw_update");
|
||||
|
||||
prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "bias");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.001f, 5.0f, 1.0, 3);
|
||||
RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Bias for reducing self shadowing");
|
||||
RNA_def_property_update(prop, 0, "rna_Light_update");
|
||||
|
||||
prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "shdwr");
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the light");
|
||||
RNA_def_property_update(prop, 0, "rna_Light_update");
|
||||
|
||||
prop = RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "radius");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
@@ -264,39 +251,6 @@ static void rna_def_light_shadow(StructRNA *srna, bool sun)
|
||||
RNA_def_property_update(prop, 0, "rna_Light_draw_update");
|
||||
|
||||
/* Eevee */
|
||||
prop = RNA_def_property(srna, "use_contact_shadow", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "mode", LA_SHAD_CONTACT);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Contact Shadow",
|
||||
"Use screen space ray-tracing to have correct shadowing "
|
||||
"near occluder, or for small features that does not appear "
|
||||
"in shadow maps");
|
||||
RNA_def_property_update(prop, 0, "rna_Light_update");
|
||||
|
||||
prop = RNA_def_property(srna, "contact_shadow_distance", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "contact_dist");
|
||||
RNA_def_property_range(prop, 0.0f, 9999.0f);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Contact Shadow Distance",
|
||||
"World space distance in which to search for "
|
||||
"screen space occluder");
|
||||
RNA_def_property_update(prop, 0, "rna_Light_update");
|
||||
|
||||
prop = RNA_def_property(srna, "contact_shadow_bias", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "contact_bias");
|
||||
RNA_def_property_range(prop, 0.001f, 9999.0f);
|
||||
RNA_def_property_ui_range(prop, 0.001f, 5.0f, 1.0, 3);
|
||||
RNA_def_property_ui_text(prop, "Contact Shadow Bias", "Bias to avoid self shadowing");
|
||||
RNA_def_property_update(prop, 0, "rna_Light_update");
|
||||
|
||||
prop = RNA_def_property(srna, "contact_shadow_thickness", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "contact_thickness");
|
||||
RNA_def_property_range(prop, 0.0f, 9999.0f);
|
||||
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Contact Shadow Thickness", "Pixel thickness used to detect occlusion");
|
||||
RNA_def_property_update(prop, 0, "rna_Light_update");
|
||||
|
||||
prop = RNA_def_property(srna, "shadow_filter_radius", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 5.0f, 1.0f, 2);
|
||||
|
||||
@@ -884,22 +884,6 @@ void RNA_def_material(BlenderRNA *brna)
|
||||
"Render polygon transparent, depending on alpha channel of the texture"},
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
static EnumPropertyItem prop_eevee_blend_shadow_items[] = {
|
||||
{MA_BS_NONE, "NONE", 0, "None", "Material will cast no shadow"},
|
||||
{MA_BS_SOLID, "OPAQUE", 0, "Opaque", "Material will cast shadows without transparency"},
|
||||
{MA_BS_CLIP,
|
||||
"CLIP",
|
||||
0,
|
||||
"Alpha Clip",
|
||||
"Use the alpha threshold to clip the visibility (binary visibility)"},
|
||||
{MA_BS_HASHED,
|
||||
"HASHED",
|
||||
0,
|
||||
"Alpha Hashed",
|
||||
"Use noise to dither the binary visibility and use filtering to reduce the noise"},
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
# endif
|
||||
|
||||
static EnumPropertyItem prop_eevee_surface_render_method_items[] = {
|
||||
@@ -971,12 +955,6 @@ void RNA_def_material(BlenderRNA *brna)
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MATERIAL);
|
||||
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
|
||||
|
||||
prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, nullptr, "blend_shadow");
|
||||
RNA_def_property_enum_items(prop, prop_eevee_blend_shadow_items);
|
||||
RNA_def_property_ui_text(prop, "Shadow Mode", "Shadow mapping method");
|
||||
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
|
||||
|
||||
prop = RNA_def_property(srna, "alpha_threshold", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_range(prop, 0, 1);
|
||||
RNA_def_property_ui_text(prop,
|
||||
|
||||
@@ -7938,15 +7938,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
"Size of the shadow map applied to each irradiance sample");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
|
||||
prop = RNA_def_property(srna, "gi_irradiance_smoothing", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 5, 2);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Irradiance Smoothing",
|
||||
"Smoother irradiance interpolation but introduce light bleeding");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "gi_glossy_clamp", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Clamp Glossy",
|
||||
@@ -7955,47 +7946,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
|
||||
prop = RNA_def_property(srna, "gi_filter_quality", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Filter Quality", "Take more samples during cubemap filtering to remove artifacts");
|
||||
RNA_def_property_range(prop, 1.0f, 8.0f);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
|
||||
/* TODO(Miguel Pozo): Remove once EEVEE is fully replaced. */
|
||||
{
|
||||
prop = RNA_def_property(srna, "gi_show_irradiance", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SHOW_IRRADIANCE);
|
||||
RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Show Irradiance Cache", "Display irradiance samples in the viewport");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "gi_show_cubemaps", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SHOW_CUBEMAPS);
|
||||
RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Show Cubemap Cache", "Display captured cubemaps in the viewport");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "gi_irradiance_display_size", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "gi_irradiance_draw_size");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 3);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Irradiance Display Size",
|
||||
"Size of the irradiance sample spheres to debug captured light");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "gi_cubemap_display_size", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "gi_cubemap_draw_size");
|
||||
RNA_def_property_range(prop, 0.05f, 10.0f);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Cubemap Display Size", "Size of the cubemap spheres to debug captured light");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "gi_irradiance_pool_size", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, eevee_pool_size_items);
|
||||
RNA_def_property_ui_text(prop,
|
||||
@@ -8031,72 +7981,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
RNA_def_property_flag(prop, PROP_ANIMATABLE);
|
||||
|
||||
/* Screen Space Subsurface Scattering */
|
||||
prop = RNA_def_property(srna, "sss_samples", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop, "Samples", "Number of samples to compute the scattering effect");
|
||||
RNA_def_property_range(prop, 1, 32);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "sss_jitter_threshold", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Jitter Threshold", "Rotate samples that are below this threshold");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
/* Screen Space Reflection */
|
||||
prop = RNA_def_property(srna, "use_ssr", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SSR_ENABLED);
|
||||
RNA_def_property_ui_text(prop, "Screen Space Reflections", "Enable screen space reflection");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_ssr_refraction", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SSR_REFRACTION);
|
||||
RNA_def_property_ui_text(prop, "Screen Space Refractions", "Enable screen space Refractions");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_ssr_halfres", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SSR_HALF_RESOLUTION);
|
||||
RNA_def_property_ui_text(prop, "Half Res Trace", "Raytrace at a lower resolution");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "ssr_quality", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(prop, "Trace Precision", "Precision of the screen space ray-tracing");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "ssr_max_roughness", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Max Roughness", "Do not raytrace reflections for roughness above this value");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "ssr_thickness", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_ui_text(prop, "Thickness", "Pixel thickness used to detect intersection");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MATERIAL);
|
||||
RNA_def_property_range(prop, 1e-6f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 5, 3);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "ssr_border_fade", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(prop, "Edge Fading", "Screen percentage used to fade the SSR");
|
||||
RNA_def_property_range(prop, 0.0f, 0.5f);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "ssr_firefly_fac", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop, "Clamp", "Clamp pixel intensity to remove noise (0 to disable)");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "ray_tracing_method", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, ray_tracing_method_items);
|
||||
RNA_def_property_ui_text(
|
||||
@@ -8206,13 +8090,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_volumetric_lights", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_VOLUMETRIC_LIGHTS);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Volumetric Lighting", "Enable scene light interactions with volumetrics");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "volumetric_light_clamp", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_text(prop, "Clamp", "Maximum light contribution, reducing noise");
|
||||
@@ -8251,29 +8128,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_gtao_bent_normals", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_GTAO_BENT_NORMALS);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Bent Normals", "Compute main non occluded direction to sample the environment");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_gtao_bounce", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_GTAO_BOUNCE);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Bounces Approximation",
|
||||
"An approximation to simulate light bounces "
|
||||
"giving less occlusion on brighter objects");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "gtao_factor", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 2);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "gtao_quality", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(prop, "Trace Precision", "Precision of the horizon search");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
@@ -8399,22 +8253,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "bokeh_denoise_fac", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Denoise Amount", "Amount of flicker removal applied to bokeh highlights");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 2);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_bokeh_high_quality_slight_defocus", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_DOF_HQ_SLIGHT_FOCUS);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"High Quality Slight Defocus",
|
||||
"Sample all pixels in almost in-focus regions to eliminate noise");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_bokeh_jittered", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_DOF_JITTER);
|
||||
RNA_def_property_ui_text(prop,
|
||||
@@ -8433,59 +8271,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_ui_range(prop, 0.0f, 20.0f, 1, 1);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
|
||||
/* Bloom is deprecated since Blender 4.2, is kept for add-on compatibility reasons and needs to
|
||||
* be removed in a future release. */
|
||||
# if 1
|
||||
prop = RNA_def_property(srna, "use_bloom", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", 0 /*SCE_EEVEE_BLOOM_ENABLED*/);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Bloom", "High brightness pixels generate a glowing effect (deprecated)");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "bloom_threshold", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Threshold", "Filters out pixels under this level of brightness (deprecated)");
|
||||
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "bloom_color", PROP_FLOAT, PROP_COLOR);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Color", "Color applied to the bloom effect (deprecated)");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "bloom_knee", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Knee", "Makes transition between under/over-threshold gradual (deprecated)");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "bloom_radius", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(prop, "Radius", "Bloom spread distance (deprecated)");
|
||||
RNA_def_property_range(prop, 0.0f, 100.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "bloom_clamp", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Clamp", "Maximum intensity a bloom pixel can have (0 to disable) (deprecated)");
|
||||
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1, 3);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "bloom_intensity", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_ui_text(prop, "Intensity", "Blend factor (deprecated)");
|
||||
RNA_def_property_range(prop, 0.0f, 10000.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 0.1f, 1, 3);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
# endif
|
||||
/* Motion blur */
|
||||
prop = RNA_def_property(srna, "motion_blur_depth_scale", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop,
|
||||
@@ -8521,24 +8306,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
# if 1
|
||||
/* Deprecated since Blender 4.2. Kept for compatibility with add-ons. Needs to be removed in a
|
||||
* future version. */
|
||||
prop = RNA_def_property(srna, "shadow_cube_size", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, eevee_shadow_size_items);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Cube Shadows Resolution", "Size of point and area light shadow maps (deprecated)");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "shadow_cascade_size", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, eevee_shadow_size_items);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Directional Shadows Resolution", "Size of sun light shadow maps (deprecated)");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
# endif
|
||||
|
||||
prop = RNA_def_property(srna, "shadow_pool_size", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, eevee_pool_size_items);
|
||||
RNA_def_property_ui_text(prop,
|
||||
@@ -8563,19 +8330,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_shadow_high_bitdepth", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SHADOW_HIGH_BITDEPTH);
|
||||
RNA_def_property_ui_text(prop, "High Bit Depth", "Use 32-bit shadows");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "use_soft_shadows", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SHADOW_SOFT);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Soft Shadows", "Randomize shadowmaps origin to create soft shadows");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
|
||||
prop = RNA_def_property(srna, "light_threshold", PROP_FLOAT, PROP_UNSIGNED);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Light Threshold",
|
||||
|
||||
Reference in New Issue
Block a user