Merge branch 'blender-v4.2-release'
This commit is contained in:
@@ -432,8 +432,6 @@ void Film::init(const int2 &extent, const rcti *output_rect)
|
||||
cryptomatte_tx_.clear(float4(0.0f));
|
||||
}
|
||||
}
|
||||
|
||||
force_disable_reprojection_ = (scene_eevee.flag & SCE_EEVEE_TAA_REPROJECTION) == 0;
|
||||
}
|
||||
|
||||
void Film::sync()
|
||||
@@ -518,7 +516,7 @@ void Film::end_sync()
|
||||
use_reprojection_ = inst_.sampling.interactive_mode();
|
||||
|
||||
/* Just bypass the reprojection and reset the accumulation. */
|
||||
if (inst_.is_viewport() && force_disable_reprojection_ && inst_.sampling.is_reset()) {
|
||||
if (!use_reprojection_ && inst_.sampling.is_reset()) {
|
||||
use_reprojection_ = false;
|
||||
data_.use_history = false;
|
||||
}
|
||||
|
||||
@@ -69,8 +69,6 @@ class Film {
|
||||
SwapChain<Texture, 2> combined_tx_;
|
||||
/** Weight buffers. Double buffered to allow updating it during accumulation. */
|
||||
SwapChain<Texture, 2> weight_tx_;
|
||||
/** User setting to disable reprojection. Useful for debugging or have a more precise render. */
|
||||
bool force_disable_reprojection_ = false;
|
||||
|
||||
PassSimple accumulate_ps_ = {"Film.Accumulate"};
|
||||
PassSimple cryptomatte_post_ps_ = {"Film.Cryptomatte.Post"};
|
||||
|
||||
@@ -376,7 +376,7 @@ float shadow_texel_radius_at_position(LightData light, const bool is_directional
|
||||
uniform_buf.shadow.film_pixel_radius);
|
||||
/* This gives the size of pixels at Z = 1. */
|
||||
scale = 1.0 / scale;
|
||||
scale = min(scale, float(1 << (SHADOW_TILEMAP_LOD - 1)));
|
||||
scale = min(scale, float(1 << SHADOW_TILEMAP_LOD));
|
||||
/* Now scale by distance to the light. */
|
||||
scale *= reduce_max(abs(lP));
|
||||
}
|
||||
@@ -396,13 +396,8 @@ float shadow_texel_radius_at_position(LightData light, const bool is_directional
|
||||
float shadow_normal_offset(vec3 Ng, vec3 L)
|
||||
{
|
||||
/* Attenuate depending on light angle. */
|
||||
/* TODO: Should we take the light shape into consideration? */
|
||||
float cos_theta = abs(dot(Ng, L));
|
||||
float sin_theta = sqrt(saturate(1.0 - square(cos_theta)));
|
||||
/* Note that we still bias by one pixel anyway to fight quantization artifacts.
|
||||
* This helps with self intersection of slopped surfaces and gives softer soft shadow (?! why).
|
||||
* FIXME: This is likely to hide some issue, and we need a user facing bias parameter anyway. */
|
||||
return sin_theta + 3.0;
|
||||
return sin_from_cos(cos_theta);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user