Fix #124514: Wrong "slight defocus" DoF

The radius was not used for the sampling offset.

Pull Request: https://projects.blender.org/blender/blender/pulls/127880
This commit is contained in:
Miguel Pozo
2024-09-20 15:22:23 +02:00
parent 34a18c7608
commit 88c84e6a37

View File

@@ -624,8 +624,8 @@ void dof_slight_focus_gather(depth2D depth_tx,
for (float s = 0.0; s < sample_count; s++) {
vec2 rand2 = fract(hammersley_2d(s, sample_count) + noise);
vec2 offset = sample_disk(rand2);
float ring_dist = sqrt(rand2.y);
vec2 offset = sample_disk(rand2) * radius;
float ring_dist = sqrt(rand2.y) * radius;
DofGatherData pair_data[2];
for (int i = 0; i < 2; i++) {