Age | Commit message (Collapse) | Author |
|
This mostly happens automatically anyway since there is usually not enough
time left over for it. But when it does it happen it breaks partial redraw,
and may also have a negative impact on responsiveness.
Ref T70295
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
With Blender 2.80 we introduced a more flexible matcap system. One
change we did was to multiply the matcap with the base color that was
shaded. As matcaps contains diffuse and specular lighting in a single
texture this lead to rendering artifacts. Artists were complaining that
everything looked to metalic.
We now support a separate `diffuse` and `specular` pass for matcaps.
`shaded_color = diffuse_light * base_color + specular_light`
For matcaps to support this feature they need to be multilayer openexr
files with 2 renderpasses (named `diffuse` and `specular`). In the future
we can change this to first pass/second pass in stead of this naming
convention.
Reviewed By: fclem, brecht
Differential Revision: https://developer.blender.org/D5335
|
|
|
|
Color banding issues can appear, as result of the 8 bitdepth RGBA that
is used in the viewport.
This change will use `GPU_RGBA16F` for final renderings and for drawing textures. This
allows displaying HDRI textures. Vertex Colors uses `GPU_RGBA16` to resolve
color banding issues. All other modes use `GPU_RGBA8` to reduce
bandwidth and gpu memory.
Reviewed By: fclem, brecht
Differential Revision: https://developer.blender.org/D5179
|
|
When in texture paint mode and in solid mode the object that is being
texture painted will be rendered by the workbench engine with textures.
All other objects would render the same. For other cases the texture paint
draw engine will still draw the texture.
The texture mode draw engine now only drawn the masks. The opacity
sliders influences the texture mask.
This change has been implemented conserably. In the future we need to
look into making this better, like adding support that every object
can be colored differently. Currently when rendering in the workbench
we can have up to 3 different color types active (what the user selected,
the fallback in case no materials have been configured and this one,
forcing textures)
Reviewed By: fclem, brecht
Differential Revision: https://developer.blender.org/D5190
|
|
... instead of overiding it (previous behavior).
In practice it's not really noticeable.
This means an object with alpha will never be more opaque when enabling
xray.
|
|
Centralize logic for when to use the PBVH for drawing, fix missing tests in
mask drawing, fix missing tests for multiple windows, only do more expensive
update for all viewports at end of the stroke.
|
|
Having both TAA and FXAA enabled at the same time resulted in conflicts.
The jitter_index was incremented twice before being used instead of once.
|
|
Continuing the transition to the new API
|
|
In recent changes the viewport_quality setting was not working what
users expected. This change will separate the anti-aliasing method that
is being used.
We now have three settings:
* scene.display.render_aa: Will be used during `Render Image`.
* scene.display.viewport_aa: Will be used during `Viewport Render Image`.
* userpref.viewport_aa: Will be used in the 3d view.
The viewport_quality setting has been replaced by the viewport_aa
setting as it was the only thing in currently controlled.
Reviewed By: brecht
Maniphest Tasks: T64132
Differential Revision: https://developer.blender.org/D4828
|
|
- Add `render_aa` and `viewport_aa` sampling setting for workbench. 0
samples means no AA, 1 sample uses FXAA and more samples will use
TAA.
The viewport `gpu_viewport_quality` can still limit viewport anti-aliasing
method.
- Use TAA when rendering images. (this used to be CPU based FSAA)
- Removed `R_OSA` related settings.
Reviewers: fclem, brecht
Maniphest Tasks: T60847
Differential Revision: https://developer.blender.org/D4773
|
|
Currently it is not possible to view the vertex colors of an object. To
optimize the workflow, workbench will need to support Vertex Colors.
The Vertex Colors is a new option in `shading->color_type`. When objects
do not have vertex color, the objects will be rendered with the
`V3D_SHADING_OBJECT_COLOR`.
In order to support vertex colors in workbench the current texture/solid
shading structure is migrated to a primary shaders and fallback shaders.
Fix: T57000
Reviewers: brecht, fclem
Differential Revision: https://developer.blender.org/D4694
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
When texure shading is enabled, the transparency accum shaders were not set/updated.
This resulted into a crash when transparent objects were rendered when shading mode
was set to texture.
This patch will add the V3D_SHADING_TEXTURE_COLOR to the modes for OIT so the
shaders are set.
Reviewed By: fclem
Maniphest Tasks: T62874
Differential Revision: https://developer.blender.org/D4592
|
|
Workbench forward engine wasn't recompiling shaders when clipping
changed, use GPUShaderConfigData when creating shaders.
|
|
workbench_material_shgroup_uniform handles this.
|
|
Due to recent changes the AA was not rendered in the viewport when not
interacting. When interacting it was. This was due to incorrect
detemination to perform TAA.
|
|
When Specular Transparent materials are used the world clipping
did not work on the transparent materials. The reason was that the
accum shaders did not vary on the existance of the clipping planes
This patch will variate the accum shaders when clipping planes are
active.
Reviewed By: fclem
Maniphest Tasks: T61023
|
|
Workbench render engine did not work when an odd number of AA samples
were used. A user could enter these values by disabling AA or set the
number of AA samples in the Render/Film panel to an odd number.
This commit will not perform TAA passes when AA is disabled.
For supporting the setting of 5 or 11 samples the bitmask was replaced
by an if statement as this was making the odd number not render
correctly.
As extra introduce the jitter samples of 5 and 11 so the images will
be more clean. a jitter sample of 11 used to read outside the allocated
space of the jitter samples.
Fix T60820
Reviewed By: fclem
Maniphest Tasks: T60820
Differential Revision: https://developer.blender.org/D4546
|
|
Need to pass the image user along to get the frame number.
|
|
Disabling color management this way is not very useful, but as long as the
option is there it should work correct.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
* Use simple default view transform for color pickers, as Filmic does not work
well for all types of colors. We better handle this with an option and tagging
of colors as emissive or albedo like.
* For solid/workbench we also no longer use Filmic, as there is not enough contrast
and it's not really needed since this is not physically based lighting.
* For lookdev always take into account the view transform and look. Other view
settings like exposure are only taken into account if scene lighting is used,
since these are often dependent on scene light intensity.
Fixes T61022, T57649, T59363.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Support the alpha channel use of the object color in solid mode.
The Transparency effect is still using the Xray algorithm and not
true Alpha blending.
|
|
This just maintain more parity accross the 2 visuals. Note that this is not
"real shadowing" just the facing factor shadowing.
|
|
This adds the posibility of having certain materials transparent in solid
mode. The option is (for now) per material only and thus only shows in
material color mode.
This uses the same rendering technique as Xray mode.
Note that objects are not considered transparent for selection with this.
|
|
- Add noise to remove undersampling artifact
- Create 2 mipmaps to the scene color buffer in order to have bigger blurs
- Replace blur2 with a 3x3 median filter that doesn't dilate the highlights
- Use temporal accumulation to remove noise
For some reason all of this exacerbate some bleeding issues happening on
far foreground elements from near foreground elements. The actual problem
was already happening before but was not really noticeable. It needs some
more work to be fixed.
|
|
- Compute samples positions on CPU.
- Use 3x3 Box blur instead of 2x2.
- Implement bokeh parameters.
With this commit, dof performance is almost negligeable.
The quality is a bit lower than before but can be improve. Also now big
Circle of confusion are supported (up to 200px).
Cost is ~1.25ms on AMD Vega with a 2560p viewport than full HD and
pretty shallow depth of field.
Coc downsampling and dilation is not used anymore for now (commented).
|
|
The algorithm used is borrowed from :
http://tuxedolabs.blogspot.com/2018/05/bokeh-depth-of-field-in-single-pass.html
This makes it possible to have a decent blur for foreground over defocused
background in one pass only.
The algorithm is using a gather approach that is much faster
than the scatter approach used in Eevee. This makes it possible to have
custom bokeh shapes (not implemented yet) which would be impossible with
a separable gaussian technique.
The blur is done in 2 steps. The first one define the shape of the bokeh
and the second that fill the undersampling.
A downsample max-CoC tile texture speed up the gathering process.
|
|
Only for workbench solid/wire modes.
|
|
|
|
Caused:
error: unsized array index must be constant
Use hard coded number of clipping planes, copying the 4th to 5 & 6
when only 4 are used.
|
|
|
|
Use clipping for workbench solid mode drawing.
Other modes & shading support still needs to be added.
|
|
This makes it possible to paint pixel art using the workbench.
Cubic interpolation is not supported but could be added if needed.
|
|
|
|
|
|
|
|
This makes the code easier to follow. Batches are now assumed to be not
NULL as the request system garatees it.
|
|
Also optimize deferred engine by only outputing material data if needed.
This make the bare flat shading mode (no effects) only a depth prepass.
|
|
We separate the background and foreground shading passes to be able to make
the object id pass optionnal if we don't need it.
This saves a bit more memory. Also not clearing all rendertargets saves
some GPU time too.
|
|
It is not used anymore
|
|
We exploit the fact that we are using the metallic workflow for material
and pass the metallic parameter instead of the specular color.
Pack the front facing bit in the color buffer only for matcap display.
Change buffer formats to use less bytes as possible.
Also don't request buffers that we won't use.
Saved 40MB on 2K screen on StudioLight + Shadows + Specular Lighting.
Includes several cleanups.
|
|
* Move the curvature computation to the cavity pass: One can argue it's not
the best performance wise (it gets a tiny perf pernalty if it is done
alone without the ssao), but it make the code cleaner and reduce
considerably the number of shader variation possible.
* Lower shader variation to 2^8 instead of 2^12
|
|
This option is per viewport.
Having view space shading make sense when working on isolated objects like
if you were holding them in your hands. But for entire scene work, it is
better to have the lighting fixed to have a better spatial representation.
|