Fix T85726 Workbench: Orthographic view is blurry
This was caused by the window_translate_m4 not offsetting the winmat in the right direction for perspective view. Thus leading to incorrect weights. The workbench sample weight computation was also inverted. This fix will change the sampling pattern for EEVEE too (it will just mirror it in perspective view).
This commit is contained in:
parent
1a427973b4
commit
bb2af40ec7
Notes:
blender-bot
2023-02-14 04:40:22 +01:00
Referenced by commit 400f2e4be6
, Fix T85959 EEVEE: DOF with "Jitter Camera" broken
Referenced by issue #85959, Eevee DOF with "Jitter Camera" broken
Referenced by issue #85726, Orthographic view is blurry - rB36814ddc94b5 regression
|
@ -4886,8 +4886,8 @@ void window_translate_m4(float winmat[4][4], float perspmat[4][4], const float x
|
|||
len1 = (1.0f / len_v3(v1));
|
||||
len2 = (1.0f / len_v3(v2));
|
||||
|
||||
winmat[2][0] += len1 * winmat[0][0] * x;
|
||||
winmat[2][1] += len2 * winmat[1][1] * y;
|
||||
winmat[2][0] -= len1 * winmat[0][0] * x;
|
||||
winmat[2][1] -= len2 * winmat[1][1] * y;
|
||||
}
|
||||
else {
|
||||
winmat[3][0] += x;
|
||||
|
|
|
@ -285,7 +285,7 @@ static void workbench_antialiasing_weights_get(const float offset[2],
|
|||
for (int x = -1; x <= 1; x++) {
|
||||
for (int y = -1; y <= 1; y++, i++) {
|
||||
float sample_co[2] = {x, y};
|
||||
add_v2_v2(sample_co, offset);
|
||||
sub_v2_v2(sample_co, offset);
|
||||
float r = len_v2(sample_co);
|
||||
/* fclem: is radial distance ok here? */
|
||||
float weight = filter_blackman_harris(r, filter_width);
|
||||
|
|
Loading…
Reference in New Issue