Commit Graph

57146 Commits

Author SHA1 Message Date
Clément Foucault
90efcd6df7 Eevee: Shadows: Add cubemap filtering and adaptive sample count.
Filter size is constant in world space and not dependant of shadow resolution.
The filter size is limited to the number of precomputed samples.
2017-09-10 03:09:45 +02:00
Clément Foucault
314739bced Eevee: Shadow: Fix Incorrect shadowing after sun lamp far clip plane.
Reject cascade sample if not in shadowmap volume.
2017-09-10 03:09:45 +02:00
Clément Foucault
9fdf094b85 Eevee: Shadows: Filtering improvement.
- Replace poisson by concentric samples: Less variance. They are sorted by radius then by angle.
- Separate filtering into 2 blur. First blur is 3x3 box blur. Second is user dependant.
- Group fetches by group of 4.
2017-09-10 03:09:45 +02:00
Clément Foucault
adeaf37e77 Eevee: Add Cascaded Shadow Map options. 2017-09-10 03:09:45 +02:00
Clément Foucault
cc6e97d426 Lamps: Remove uper limit of the buffer bias parameter. 2017-09-10 03:09:45 +02:00
Clément Foucault
716f7859a8 Eevee: Add Cascaded Shadow Map support with filtering.
This brings some data structure changes.
Shared shadow data are stored in ShadowData (in glsl) (aka EEVEE_Shadow in C).
This structure contains the array indices of the first shadow element of this shadow "object".
It also contains how many shadow to evaluate (to be used for Multiple shadow maps).

The filtering is noisy and needs improvement.
2017-09-10 03:09:45 +02:00
Clément Foucault
6c17348e91 Eevee: Shadow: Add high bitdepth option.
This option is here for reducing the memory usage of shadow maps.

Also lower bitdepth are quicker to process.
2017-09-10 03:09:45 +02:00
Clément Foucault
f46b908cc5 Eevee: Expose Shadow filter size. 2017-09-10 03:09:45 +02:00
Clément Foucault
32e96448b9 Eevee: Add Variance Shadow Mapping
This is an alternative to ESM. It does not suffer the same bleeding artifacts.
2017-09-10 03:09:45 +02:00
Clément Foucault
e2603a6e82 Eevee: Shadows: Add UI buttons for size and method
Only one method is available right now. VSM and PCF are comming.
2017-09-10 03:09:45 +02:00
Clément Foucault
8b7a83a868 Eevee: Refactor Shadow System
- Use only one 2d texture array to store all shadowmaps.
- Allow to change shadow maps resolution.
- Do not output radial distance when rendering shadowmaps. This will allow fast rendering of shadowmaps when we will drop the use of geometry shaders.
2017-09-10 03:09:45 +02:00
Campbell Barton
5b026486e4 Fix leak caused by wrong ownership flag 2017-09-08 04:22:19 +10:00
Campbell Barton
df58d6bf76 Fix T52046: View transform applied twice w/ GL render
Patch from @sergey w/ minor edit.
2017-09-08 03:57:07 +10:00
Campbell Barton
a133b74709 Merge branch 'master' into blender2.8 2017-09-08 03:18:39 +10:00
Campbell Barton
60020f57d7 Correct function name in argument parsing 2017-09-08 00:59:27 +10:00
Campbell Barton
e44bf43f6c PyAPI: add function to get an RNA subclass
This is inconvenient in regular Python, add a class-method
to perform the operation, eg:

bpy.types.Node.bl_rna_find_subclass("CustomNodeType")
2017-09-08 00:02:09 +10:00
Campbell Barton
accc94dd73 Cleanup: remove goto's 2017-09-07 22:53:46 +10:00
Campbell Barton
f4d46916fa UI: fix memory leak when copy-to-selected failed 2017-09-07 22:15:12 +10:00
Campbell Barton
1601089ece Merge branch 'master' into blender2.8
This discards node drawing changes which need to be written as shaders.
2017-09-07 14:53:06 +10:00
Campbell Barton
3f8aaec6bd Weight Smooth: remove source option
Use current selection mode instead of an operator option.
2017-09-07 14:14:42 +10:00
Campbell Barton
5f7de54243 Fix T52639: Weight paint smooth tool crash 2017-09-07 13:20:39 +10:00
Campbell Barton
8172e8e528 Node UI: Add square and diamond socked draw styles
Currently not used by Blender's node trees

D2814 by @charlie
2017-09-07 04:45:38 +10:00
Campbell Barton
fb2e0592bc Fix crash using arrow manipulator 2017-09-07 01:56:42 +10:00
Brecht Van Lommel
e2f42ff907 Merge branch 'master' into blender2.8 2017-09-06 17:23:47 +02:00
Brecht Van Lommel
82ede9de48 Fix mistake in previous fix for T52640. 2017-09-06 17:22:38 +02:00
Campbell Barton
16fbb47c88 Use normalized project functions 2017-09-07 01:20:59 +10:00
Brecht Van Lommel
4d8980a690 Fix T52640: crash when opening image file browser in some cases.
There was some invalid state in the screen here, some areas had
sa->full set even though no screen was maximized, which then caused
a restore from the wrong (empty) area, which then led to spacedata
being empty and a crash.

This fix properly clears the sa->full after restore, and also fixes
existing .blend files in such an invalid state.
2017-09-06 16:17:18 +02:00
Campbell Barton
584523e0ad Screw Modifier: remove doubles option
Vertices on the axis can be optionally merged,
nice for creating objects which close at the end-points.
2017-09-07 00:12:43 +10:00
Campbell Barton
6e0fd239e3 Math Lib: normalized vector project functions 2017-09-07 00:12:43 +10:00
Brecht Van Lommel
dd8016f708 Fix T52652: Cycles image box mapping has flipped textures.
This breaks backwards compatibility some in that 3 sides will be mapped
differently now, but difficult to avoid and can be considered a bugfix.
2017-09-06 13:51:45 +02:00
Campbell Barton
56ff14ea63 View3D Remap: skip defmaterial
This isn't library data.
2017-09-06 20:57:25 +10:00
Campbell Barton
e54caf76cb Fix T52663: Remap used invalid local-view data
Only the camera from View3D.localvd is used,
other pointers may be invalid.

Longer term we should probably clear these to ensure no accidents.
For now just follow the rest of Blender's code and don't access.
2017-09-06 20:52:49 +10:00
Campbell Barton
b41d34040b Merge branch 'master' into blender2.8 2017-09-06 16:50:59 +10:00
Campbell Barton
47b7f06d0e Fix error in high bit-depth image tile drawing
From @1xundoredo in D2824
2017-09-06 16:11:19 +10:00
Sergej Reich
0fd31c53ee Rigidbody: Fix regression introduced in ee3fadd
Baking rigid body cache was broken if some cached frames already
existed.

This is just a band aid for release, the logic need to be looked into
further.
2017-09-05 19:59:46 +02:00
Sergej Reich
4ad5df8858 Fix T52374: Changes of rigid body related settings during simulation will break the simulation
Revert 9cd6b03, 3edc8c1, b87d10d and do a better fix for T50230.
2017-09-05 19:59:46 +02:00
Campbell Barton
6c66e1bc83 Fix T52251: Knife cur displaces surface 2017-09-06 01:50:36 +10:00
Dalai Felinto
518e768579 Fix T52441: Principle BSDF clearcoat
Since the change to prevent shader recompilation at every update, we got
a regression when clearcoat was used.

Basically at the shader build time we would determine if the shader
needed clear coat, and if it didin't, it would build a different GLSL
program.

However if later the user updated the clearcoat value so that it would
then require the full clearcoat shader, the user wouldn't get it until
manually forcing the shader to recompile, or reopening the file.

We now handle the optimization in the GLSL code. That adds a minimum
overhead due to branching. But the overall performance seems unchanged
(tested on linux in AMD and NVidia).

Reviewers: pascal, brecht, fclem

Differential Revision: https://developer.blender.org/D2822
2017-09-05 16:40:27 +02:00
Campbell Barton
bffa57e6d8 Manipulator: Fix arrow2d drawing outside hotspot 2017-09-06 00:40:20 +10:00
Campbell Barton
16e5b932b7 Manipulator: cage2d initial rotation support 2017-09-06 00:06:53 +10:00
Campbell Barton
0a1a7323e5 Manipulator: missing exit() call 2017-09-06 00:06:53 +10:00
Campbell Barton
572b1a644f Merge branch 'master' into blender2.8 2017-09-05 22:56:03 +10:00
Campbell Barton
4d85396fe4 Cleanup: use const
Also use assert w/ rotate_m4.
2017-09-05 22:45:44 +10:00
Bastien Montagne
6859695055 Fix T52649: missing custom (split) normals from FBX exporter.
Own mistake in recent rB25c5928b2b6 (this DOES NOT affect 2.79 release).
2017-09-04 21:04:19 +02:00
Sergey Sharybin
4a744727be Fix T52531: Blender 2D stabilisation node issue when autoscale is selected
Threading conflict, should be safe for 2.79.
2017-09-04 16:41:28 +02:00
Sergey Sharybin
71f0c32dad Fix T52522: VSE renders with alpha transparent PNG image incorrectly
Need some extra checks and should be probably end up in 2.79 since that's a regression.
2017-09-04 14:46:17 +02:00
Campbell Barton
f4fb329808 RNA/PyAPI: Expose Py classes in bpy.types
Operators and their properties are two different types

Previously both operators and their properties are added
causing C operators to access the properties, Python the classes.

Favor consistency in this case so only Python classes are added.
2017-09-04 14:49:27 +10:00
Campbell Barton
85d53620aa Cleanup: avoid confusing assignment 2017-09-04 14:35:35 +10:00
Jeroen Bakker
718af8e8b3 T52534: Compositor artifacts when scaling
Increased the maxx and maxy area of interest when scaling in this case.
2017-09-03 16:47:39 +02:00
Campbell Barton
4d148471b6 Fix T52634: EditMesh Remove doubles could hang
A single diagonal axis was used for sorting coordinates,
the algorithm relied on users not having vertices axis aligned.

Use BLI_kdtree to remove doubles instead.

Overall speed varies, it's more predictable than the previous method.
Some typical tests gave speedup of ~1.4x - 1.7x.
2017-09-03 23:52:10 +10:00