Age | Commit message (Collapse) | Author |
|
See comment in code for more details.
Differential Revision: https://developer.blender.org/D10615
|
|
The environment (world) irradiance wasn't correctly skipped.
|
|
The SSS shader in Eevee has the following drawbacks (elaborated in {T79933}):
1. Glowing
2. Ringing. On low SSS jittering it is rendered a bunch of sharp lines
3. Overall blurriness due to the nature of the effect
4. Shadows near occlusions as in T65849
5. Too much SSS near the edge and on highly-tilted surfaces
{F9438636}
{F9427302}
In the original shader code there was a depth correction factor, as far as I can understand for fixing light bleeding from one object to another. But it was scaled incorrectly. I modified its scale to depend on SSS scale*radius and made it independent from the scene scale. The scale parameter (`-4`) is chosen so that it makes tilted surfaces to have visually the same SSS radius as straight surfaces (surfaces with normal pointed directly to the camera).
This depth correction factor alone fixes all the problems except for ringing (pt. 2). Because of float-point precision errors and irradiance interpolation some samples near the border of an object might leak light, causing sparkly or dashed (because of aliasing) patterns around the highlights. Switching from `texture()` to `texelFetch()` fixes this problem and makes textures on renders visually sharper.
An alternative solution would be to detect object borders and somehow prevent samples from crossing it. This can be done by:
1. Adding an `object_id` texture. I think it requires much more code changing and makes the shader more complicated. Again, `object_id` is not interpolatable.
2. Watch gradient of depth and discard samples if the gradient is too big. This solution depends on scene scale and requires more texture lookups. Since SSS is usually a minor effect, it probably doesn't require that level of accuracy.
I haven't notice it in practice, but I assume it can make visible SSS radius slightly off (up to 0.5 px in screen space, which is negligible). It is completely mitigated with render sampling.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D9740
|
|
This improve self intersection prevention. Also reduce the bias
that was making a lot of rays not being shoot at grazing angles.
|
|
This is ported from Cycles and fixes issues with bump/normal mapping
giving weird reflections/lighting.
Fixes T81070 Specular light should be limited to normal pointing toward the camera
Fixes T78501 Normal mapping making specular artifact
|
|
Also use doxygen comments for sculpt functions.
|
|
The shadowing was computed on the light distance squared,
leaking to much light since it was integrating the extinction behind
the ligth itself.
Also bump the maximum shadow max step to the actual UI values. Otherwise
we get shadowing under evaluated because `dd` is too small.
|
|
missing NULL check if there is no cache there to begin with.
Differential Revision: https://developer.blender.org/D10581
|
|
The performance debug menu isn't used that often anymore as render doc
also show the timings. This patch will make sure that enabling the
performance debug view (21) does not crash blender.
|
|
Bad copy paste...
|
|
This was caused by a missing version check.
|
|
This fixes the issue of bokeh size being smaller when using overblur.
The additional overblur needs to be centered on the outer radius.
|
|
Cryptomatte layers in Blender are predefined. Other render engines
might have other naming schemes. This patch will allow creation of
cryptomatte layers with other names. This will be used by D3959 to
load cryptomatte openexr files from other render engines.
EEVEE and Cycles still use our fix naming scheme so no changes are
detectable by users.
|
|
Was caused by recent changes in window_translate_m4 by rBbb2af40ec7dd.
|
|
|
|
This was creating incorrectly occluded overlays.
|
|
Current implementation was to restricting for future enhancements where
the CryptomatterLayer could be read from existing metadata.
|
|
With the previous implementation, we could have pixels with offset larger
than 1 pixel.
Also fix a bug when the closest_index is not last. The sample positions
were incorrect in this case.
|
|
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).
|
|
|
|
There was a similar report prior to the introduction of the Image
Engine, see T74586.
This was fixed by rB6a5bd812b569 at that time, but got lost in the
refactor it seems.
Above commit introduced the `ED_space_image_get_display_channel_mask`
function that will determine
the valid bitflags for the display channel of a given ImBuf.
But since the refactor, this is not called anymore (`draw_image_main` is
not called anymore)
Now it seems we can safely reuse that said function
`ED_space_image_get_display_channel_mask` also for the Image Engine.
Maniphest Tasks: T85895
Differential Revision: https://developer.blender.org/D10510
|
|
Taa offset was applied on first sample. This wasn't happening before
DOF refactor.
Also fixes T85618 Wireframe Displays Strangely in Eevee (Rendered,
material Preview)
|
|
Contact shadows needed correct `gl_FragCoord.z` but this is not
correctly set for fullscreen passes. Need to pass depth using a global
variable until we get rid of `cl_eval.tracing_depth`.
|
|
Was caused by non initialized render_timesteps.
|
|
Was caused by non initialized render_timesteps.
|
|
.. it's a reserved keyword on GL > 4.0.
|
|
Aperture for a cone is 2 times the cone angle.
|
|
... for local variables.
|
|
This removes the last places where this was not the case.
We follow cycles convention of P being for Postion.
|
|
This makes is clearer and avoid having to setup worldPosition if
shader is not a material shader.
|
|
This adds an approximation of inverted AO by reversing the max horizon
search (becoming a min horizon). The horizons are correctly clamped in
the reverse direction to the shading and geometric normals.
The arc integration is untouched as it seems to be symetrical.
The limitation of this technique is that since it is still screen-space
AO you don't get other hidden surfaces occlusion. This is more
problematic in the case of inverted AO than for normal AO but it's
better than no support AO.
Support of distance parameter was easy thanks to recent AO refactor.
|
|
Nice format to output high definition normals or normalized colors.
|
|
Fix regression with roughness not masking reflections when not using
Screen Space raytracing.
The trick was to only evaluate one planar per pixel, the one with
the most influence. This should not be too limiting since this is what
we do for SSR.
Also change evaluation order do not apply occlusion on planars probes.
|
|
AO is always on in this case.
|
|
- Fix noise/banding artifact on distant geometry.
- Fix overshadowing on un-occluded surfaces at grazing angle producing "fresnel"
like shadowing. Some of it still appears but this is caused to the low number
of horizons per pixel.
- Improve performance by using a fixed number of samples and fixing the
sampling area size. A better sampling pattern is planned to recover
the lost precision on large AO radius.
- Improved normal reconstruction for the AO pass.
- Improve Bent Normal reconstruction resulting in less faceted look on
smoothed geometry.
- Add Thickness heuristic to avoid overshadowing of thin objects.
Factor is currently hardcoded.
- Add bent normal support to Glossy reflections.
- Change Glossy occlusion to give less light leaks from lightprobes.
It can overshadow on smooth surface but this should be mitigated by
using SSR.
- Use Bent Normal for rough Glossy surfaces.
- Occlusion is now correctly evaluated for each BSDF. However this does make
everything slower. This is mitigated by the fact the search is a lot faster
than before.
|
|
|
|
As now is possible to use multiframe in Draw mode, the option to display only lines must be disabled.
|
|
The problem was introduced fixing task T85035.
As the frame was set again when render, if there was a time modifier, the frame was not remaped to the right frame number.
|
|
When edit using Onion skin, the edit line was missing.
|
|
The fill unclamped thickness value was not properly initialized for using with the new antialiasing.
The error was introduced in commit 09f7c9385829
|
|
|
|
This option was broken since the draw engine refactor and it was impossible to display only edit lines for multiframe mode.
|
|
|
|
Caused by rB85fe12071ad7.
When looking at a render pass in viewport and move the camera, there's a
"flash" effect in this AOVs test file:
{F9753476}
{F9753473}
The cause seems to be that taa_current_sample when rendering
(DRW_state_is_image_render()) is ok because it has been incremented in
EEVEE_temporal_sampling_draw but taa_current_sample is wrong when we are
not rendering.
D10375 by Ulysse Martin (youle) with clang format changes.
Reviewed By: jbakker, lichtwerk, also blessing from fclem
Differential Revision: https://developer.blender.org/D10375
|
|
|
|
|
|
To avoid anti-aliasing artifacts on GPencil strokes that have a size smaller than 1 the thickness
is clamped and the opacity reduced. This was done in vertex shader but this had the side effect
of causing strokes that go from large to small to fade across their lengths.
**Solution**
The opacity modulation has now been moved to the fragment shader as advised by Clément Foucault.
The strokeThickness that was passed to the shader was clamped to prevent it from being too small so an additional
unclamped thickness has been passed to the fragment to calculate the opacity modulation. Alternatively I could have chosen
strokeThickness and clampedThickness but I decided against renaming the variables in the current code.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D10438
|
|
|
|
|
|
This uses the same logic as drawing UV's,
where non-bmesh defaults to mesh.
|