Age | Commit message (Collapse) | Author |
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
This was caused by the preview render of the material property panel being
1px wide. The computed half buffers width were rounded to 0.
|
|
|
|
This cleans up a bit of duplicated code and some confusion about
what was culled and what wasn't.
Now everything is culled based on the given object pointer.
If the object pointer is NULL there is no culling performed.
|
|
|
|
The unit system is designed for displaying and editing and not for
rendering. Eevee, Workbench and GPencil used these settings to convert
the focal length and sensor size to world units. Making depth of field
render differently with Cycles.
For now we will remove the scale in the draw engines to match cycles,
until we implemented a camera parameters specific scale.
Reviewed By: brecht, fclem
Maniphest Tasks: T64988
Differential Revision: https://developer.blender.org/D4925
|
|
|
|
There is now a checkbox to enable/disable depth of field per camera. For Eevee
this replace the scene level setting. For Cycles there is now only an F-Stop
value, no longer a Radius.
Existing files are converted based on Cycles or Eevee being set in the scene.
Differential Revision: https://developer.blender.org/D4882
|
|
|
|
|
|
Viewport now displays alpha checkerboard pattern like Cycles does when
film alpha is set to "Transparent".
Some small workarounds were necessary for Depth of Field and correct TAA
support.
|
|
|
|
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
|
|
Most API's already use this convention.
|
|
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Rename for Camera, View3D (also CameraParams & Render not DNA)
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
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.
|
|
|
|
|
|
|
|
Even though the fragment shader was already discarding all members of
dof_bokeh_sides when blades was zero, the C code was still trying to
use this for a few divisions leading to runtime asserts.
Those are harmless yet can lead some to waste time while pursuiting
other bugs (namely a near freeze when blades aspect ratio is too low).
|
|
|
|
NOTE: There is a float imprecision near the focus plane
due to the current technique used for DOF. This makes the alpha channel
transparent on nearly in focus objects even when they should not.
This artifact should be fixed when the DOF will use scatter as gather for
low brightness areas.
Fix T57042 : Eevee does not render alpha when DOF is turned on
|
|
|
|
|
|
|
|
This was no longer working since 15c2801aac33.
|
|
We handle doversion for the scene properties, but not for the
view layer overrides.
Overrides will be implemented in a different way via dynamic overrides.
For now this data is completely lost.
|
|
This means only one texture to draw to and only one sprite per pixel.
The texture is twice as large and near and far planes are side by side.
The sprite choose the biggest coc to expand to and is redirected to the
area (layer) it belongs to.
The fragment shader discard every pixel that does not belong to the correct
layer.
|
|
Due to the scatter operation being done at half resolution, undersampling
is visible at bokeh shape edges (because of the hard cut).
This commit adds a smoothing function to minimize the problem.
Also optimize the bokeh shape parametrization by precomputing a lot of
constants.
|
|
This new blending allows background to fill the gaps left by forground
objects. However this has a drawback, background objects that should be
partially occluded in this case can be seen through the blurred objects.
This does not fix the problem of blurred foreground over sharp background.
Also cleanup code to be simpler and remove unused geometry shader.
|
|
For some we may add per object overrides, but for most we plan to keep them
strictly per viewport settings. Display settings from the mesh still need to
be moved here, only collections were done to remove that code.
|
|
Because:
- Less redundancy.
- Better suffixes.
Also a few modification to GPU_texture_create_* to simplify the API:
- make the format explicit to the texture creation process.
- remove the component count as it's specified in the GPUTextureFormat.
|
|
This is in order to not mix it with the incomming buffer textures.
|
|
This refactor modernise the use of framebuffers.
It also touches a lot of files so breaking down changes we have:
- GPUTexture: Allow textures to be attached to more than one GPUFrameBuffer.
This allows to create and configure more FBO without the need to attach
and detach texture at drawing time.
- GPUFrameBuffer: The wrapper starts to mimic opengl a bit closer. This
allows to configure the framebuffer inside a context other than the one
that will be rendering the framebuffer. We do the actual configuration
when binding the FBO. We also Keep track of config validity and save
drawbuffers state in the FBO. We remove the different bind/unbind
functions. These make little sense now that we have separate contexts.
- DRWFrameBuffer: We replace DRW_framebuffer functions by GPU_framebuffer
ones to avoid another layer of abstraction. We move the DRW convenience
functions to GPUFramebuffer instead and even add new ones. The MACRO
GPU_framebuffer_ensure_config is pretty much all you need to create and
config a GPUFramebuffer.
- DRWTexture: Due to the removal of DRWFrameBuffer, we needed to create
functions to create textures for thoses framebuffers. Pool textures are
now using default texture parameters for the texture type asked.
- DRWManager: Make sure no framebuffer object is bound when doing cache
filling.
- GPUViewport: Add new color_only_fb and depth_only_fb along with FB API
usage update. This let draw engines render to color/depth only target
and without the need to attach/detach textures.
- WM_window: Assert when a framebuffer is bound when changing context.
This balance the fact we are not track ogl context inside GPUFramebuffer.
- Eevee, Clay, Mode engines: Update to new API. This comes with a lot of
code simplification.
This also come with some cleanups in some engine codes.
|
|
|
|
TAA / multiple samples is not working at the moment.
|
|
Both object level and camera datablock properties animation did not work with
copy on write enabled.
The root of the issue is going to the fact, that all interface elements are
referencing original datablock. For example, View3D has pointer to camera it's
using, and all areas which does access v3d->camera should in fact query for
the evaluated version of that camera, within the current context.
Annoying part of this change is that we now need to pass depsgraph in lots
of places. Which is rather annoying.
Alternative would be to cache evaluated camera in viewport itself, but then
it makes it annoying to keep things in sync.
Not sure if there is nicer solution here.
Reviewers: dfelinto, campbellbarton, mont29
Subscribers: dragoneex
Differential Revision: https://developer.blender.org/D3007
|
|
Use full 32bit floats buffers. This increase render time but also color fidelity.
|
|
It was using a wrong blending function.
|
|
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.
* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started
Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.
Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.
Reviewers: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D2927
|
|
|
|
Also move descriptions into doxy header
|
|
This also:
- make sure to only compile the shader needed by the active effects.
- same thing for the shading groups.
- disable TAA if motion blur is active (avoid infinite refresh).
|