Commit Graph

60747 Commits

Author SHA1 Message Date
Clément Foucault
1fff3e02c2 DRW: Add DRW_STATE_BLEND_PREMUL blend mode. 2018-05-02 20:49:38 +02:00
Clément Foucault
12570c7373 GPUShader: Add GPU_SHADER_2D_IMAGE_MULTISAMPLE_2/4/8/16
This shader is used instead of blitting back and forth to a single sample
buffer.

This means it resolves the color and depth samples and outputs a fragment
which can be depth tested and blended on top of an existing framebuffer.

We do static shader variation with manual loop unrolling for performance
reason. In my test I get 25% more perf with intel integrated gpu and 75%
performance gain with dedicated nvidia card compared to a single shader
with a uniform for sample count.
2018-05-02 20:49:38 +02:00
Clément Foucault
a8463284bb GPUShader: Fix simple lighting modulating alpha color 2018-05-02 20:49:38 +02:00
Clément Foucault
ad97ba3367 Object Mode: Draw non meshes before outline.
This makes the outlines occluded by the other objects. This was a problem
before the outline refactor but now there is no need for it.
2018-05-02 20:49:38 +02:00
Clément Foucault
e493a1a1ae DRW: Armature: New bone outline shader.
This fix the issue with the zfighting we were getting at bones edges.

Moreover, this enables us to render arbitrarly large outline with
varying thickness.
2018-05-02 20:49:38 +02:00
Clément Foucault
77b481fd5a DRW: Add Adjacency info for bone shapes.
Only for cube and octahedral shapes for now.
2018-05-02 20:49:38 +02:00
Clément Foucault
3f9f27e5a8 GPUTexture: Fix wrong multisample texture size. 2018-05-02 20:49:38 +02:00
Clément Foucault
fd23c42faa Paint Vertex Mode: Fix shader not free. 2018-05-02 18:39:53 +02:00
Clément Foucault
1ff2646d58 Eevee: Add Lamp Specular multiplier.
It's usefull in some scenario to tweak the specular intensity of a light
without modifying the diffuse contribution.

Cycles allows it via lamps material which we currently not support in Eevee.

This is a good workaround for now.
2018-05-02 18:39:53 +02:00
Dalai Felinto
965e6ed54f Fix T54864: Assert when changing interface display scale
The asserts were introduced on rB5f6c45498c92 (top-bar).

Although the asserts are technically correct, they would fail even in master.
And the commit simply added the asserts without fixing the situation itself
(as you can see in the report, it is really simple to reproduce this issue).

I propose we remove the asserts and bring them back only when the situation
itself is fixed. It doesn't make sense to introduce asserts that would fail
with the current state of the code.
2018-05-02 18:32:44 +02:00
Jeroen Bakker
d877831115 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-02 17:37:37 +02:00
Jeroen Bakker
f0d67d8f6a Workbench: Linear => srgb conversion 2018-05-02 17:37:11 +02:00
Dalai Felinto
b6b17338c2 Fix mysterious crash on tooltips
This was a hard to reproduce bug, but it happens often enough.
Basically the tooltip of the active tool was been invoked when
context had no valid ScrArea which would lead to a crash.

We now just return no tooltip in these cases.
2018-05-02 17:37:05 +02:00
Sergey Sharybin
3fa6b6ed4c Depsgraph: Add function to iterate over all original IDs 2018-05-02 17:09:44 +02:00
Sergey Sharybin
7c32ef84aa Use meaningful debug name for render depsgraph 2018-05-02 17:09:44 +02:00
Sergey Sharybin
6560a96232 Depsgraph: Show log message when tagging specific depsgraph ID 2018-05-02 17:09:44 +02:00
Sergey Sharybin
b6aa8a71fd Depsgraph: Add per-depsgraph debug name which is shown in the logs
This way we can see for which depsgraph datablock is being evaluated for.
2018-05-02 17:09:44 +02:00
Sergey Sharybin
651a255931 Depsgraph: Cleanup, naming conventions 2018-05-02 17:09:44 +02:00
Sergey Sharybin
bb75c4cbe9 Depsgraph: Make all print messages to respect per-depsgraph debug flags 2018-05-02 17:09:44 +02:00
Sergey Sharybin
65e6654c85 Depsgraph: Allow per-depsgraph debug flags
Currently only affects EVALUATION debug messages, rest are to be
supported on per-depsgraph level.
2018-05-02 17:09:44 +02:00
Sergey Sharybin
2f4dea0ef9 Depsgraph: Use utility function to print CoW update function 2018-05-02 17:09:44 +02:00
Sergey Sharybin
c7e0bb0b90 Depsgraph: Make bAction a part of dependency graph
There are various values which depends on context in there, for example
current driver value and original DNA value f-curve is applied for.

This partially fixes issue with not being able to tweak keyed values
when material preview is open.

The material preview is not being currently updated against non-keyed
changes since every tweak of material property does full preview scene
depsgraph evaluation.
2018-05-02 17:09:44 +02:00
Jeroen Bakker
98461aa5dc Workbench: Fix interface change in draw maanger 2018-05-02 17:08:42 +02:00
Jeroen Bakker
9cfbdff71c Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-02 16:59:42 +02:00
Clément Foucault
befbf7eb9b Vertex Paint: Use Linear colors for interpolation.
This matches Cycles and Eevee's behaviour.
2018-05-02 16:45:08 +02:00
Clément Foucault
a2b05accea Eevee: Fix vertex color being in srgb space.
Now they are properly converted to Linear space before interpolation.

Since the only way to get vertex color in eevee and cycles is via the
attribute node with the CD_AUTO_FROM_NAME flag, we have to know at binding
time which type of buffer will be connected to this auto input.

We store this information inside the batch cache (together with the according
uniform name) and pass it as uniform to the shader which does conversion if
needed. The same shader can then be reused to draw another mesh with
different auto layers configuration.
2018-05-02 16:45:08 +02:00
Sybren A. Stüvel
648de1be52 Modifiers: ported Skin modifier DerivedMesh → Mesh 2018-05-02 16:39:22 +02:00
Sybren A. Stüvel
3f2f27642e Renamed 1st parameter of BKE_bmesh_to_mesh from me to be
It's a BMesh, it shouldn't be called `me`
2018-05-02 16:39:22 +02:00
Bastien Montagne
ce7575c823 Static Override: Move 'auto' flag into override struct, expose it to RNA. 2018-05-02 16:15:52 +02:00
Sybren A. Stüvel
40771a0e9e Modifiers: ported Solidify modifier DerivedMesh → Mesh 2018-05-02 16:03:16 +02:00
Campbell Barton
2450b70efa Mesh: add runtime customdata dirty flags 2018-05-02 15:52:59 +02:00
Campbell Barton
9e477bdf63 Mesh: move runtime members to own struct 2018-05-02 15:48:17 +02:00
Jeroen Bakker
ae1ba7679c Workbench: update of 3dview 2018-05-02 15:32:59 +02:00
Campbell Barton
5659d8bc0a Merge branch 'master' into blender2.8 2018-05-02 14:40:00 +02:00
Campbell Barton
23fe6e7eab Merge branch 'master' into blender2.8 2018-05-02 14:37:32 +02:00
Sybren A. Stüvel
eaf6345d4b Lattice modifier: take comparison out of loop 2018-05-02 13:51:31 +02:00
Sybren A. Stüvel
1f8720cf05 Modifiers: ported Lattice modifier DerivedMesh → Mesh 2018-05-02 13:42:09 +02:00
Campbell Barton
d09920687c Merge branch 'master' into blender2.8 2018-05-02 12:46:14 +02:00
Campbell Barton
adc17317c5 UI: open toolbar hold buttons on drag
Allows for faster tool switching, no need to wait for it to open.
2018-05-02 12:20:11 +02:00
Sybren A. Stüvel
81175eb40d Modifiers: ported Bevel modifier DerivedMesh → Mesh
This introduces `BKE_mesh_to_bmesh_ex()`, which exposes all of the
`BMeshFromMeshParams` parameters to the caller. This is required to enable
the `calc_face_normal` flag, which is required for the Bevel modifier.

This also introduces `BKE_bmesh_to_mesh()`, which allocates a new `Mesh`,
converts the `BMesh` to it, and returns it. The returned mesh is owned by
the caller.
2018-05-02 12:15:00 +02:00
Jeroen Bakker
baf0547de5 Workbench: Single Color Modes
- ability to switch between Single Color, Object Color, Material Color
and Random Color
 - fixed Shading and Lighting popover
 - Renamed Solid -> Single Color
2018-05-02 12:05:40 +02:00
Campbell Barton
62ed13340b UI: don't allow disabled popovers to open w/ drag
First dragging over active menu items could be used to open a disabled
popover.
2018-05-02 12:02:50 +02:00
Campbell Barton
31d5fcd2a7 UI: run redo poll check in operators context 2018-05-02 11:33:24 +02:00
Campbell Barton
85dcdb87d2 UI: fix operator redo showing empty popovers
Many operators have no options,
showing a popover button with no content isn't good.
2018-05-02 11:03:03 +02:00
Campbell Barton
2bc9396b55 UI: disable popovers when panel poll fails 2018-05-02 11:03:03 +02:00
Campbell Barton
9b21055dfb WM: utility to check if an operator will draw a UI
Checking if a redo operator will show something is needed
to avoid empty redo popover.
2018-05-02 11:03:03 +02:00
Dalai Felinto
3def6c7f8e Edit Mesh: look-cut copy-on-write support
Note: As already commented in the code, the ideal solution would
be to pass select mode as parameter to ED_view3D_backbuf_validate.

Without that we have to resort to the hack solution of writing to
evaluation data.
2018-05-02 10:13:22 +02:00
Campbell Barton
c052346fbf UI: move object selector into 3D view
This matches the new convention for left-handed mode selectors,
however we're still undecided on exactly how this should work.

For now test this out as a convention for all space types.
2018-05-01 22:33:10 +02:00
Clément Foucault
e1bd883df3 Eevee: Don't enable temporal AA when using 1 sample only.
This was producing infinite rendering but wasn't noticeable.
2018-05-01 19:39:18 +02:00
Clément Foucault
20c1edf592 Eevee: Shadows: Only tag as shadow caster if a shadow is cast.
This leads to great improvement if the scene have moving objects without
shadows (shadows disabled in the material panel).
2018-05-01 19:39:18 +02:00