Eevee: Fix Dof shader compilation.
This commit is contained in:
parent
d25ec499d8
commit
5be0dfe086
|
@ -40,7 +40,12 @@ void main()
|
|||
coc = min(coc, bokeh_maxsize);
|
||||
|
||||
if (coc >= 1.0) {
|
||||
color = texelFetch((is_near) ? nearBuffer : farBuffer, texelco, 0);
|
||||
if (is_near) {
|
||||
color = texelFetch(nearBuffer, texelco, 0);
|
||||
}
|
||||
else {
|
||||
color = texelFetch(farBuffer, texelco, 0);
|
||||
}
|
||||
/* find the area the pixel will cover and divide the color by it */
|
||||
color.a = 1.0 / (coc * coc * M_PI);
|
||||
color.rgb *= color.a;
|
||||
|
|
Loading…
Reference in New Issue