Commit Graph

56790 Commits

Author SHA1 Message Date
Clément Foucault
6e2f17ea02 Eevee: Refraction: Add "thickness" parameter.
This enables to fake a second refraction event. This is great to simulate thin planar objects such as glass panels.
2017-08-10 15:43:48 +02:00
Clément Foucault
896154d15d Eevee: Fix multiply blend mode. 2017-08-10 15:43:48 +02:00
Clément Foucault
2ba11d72a2 Object Mode Engine: Optimize outline passes.
Group texture fetches to hide latency. 3.2ms -> 2.2ms (constant time improvement, not depending on scene complexity)

Could optimize further with textureGather (require OpenGL 4.0).
2017-08-10 15:43:48 +02:00
Clément Foucault
7641f92710 Eevee: Refraction: Make it available for opaque materials.
Theses Materials are rendered after the SSR pass.
The only difference with previous method is that they have a depth prepass (less overdraw) and are not sorted.
2017-08-10 15:43:48 +02:00
Clément Foucault
7ef8a49ad5 DRW: Indent profiler timings. 2017-08-10 15:43:48 +02:00
Clément Foucault
723778b162 Eevee: Fix AO not working. 2017-08-10 15:43:48 +02:00
Clément Foucault
d16342e5fd Eevee: Add Screen Space Refraction.
For the moment the only way to enable this is to:
- enable Screen Space REFLECTIONS.
- enable Screen Space Refraction in the SSR parameters.
- enable Screen Space Refraction in the material tab.
2017-08-10 15:43:48 +02:00
Clément Foucault
98a7f1b335 Eevee: Refraction: Fix border artifacts. 2017-08-10 15:43:48 +02:00
Clément Foucault
f53fa8d148 Eevee: SSR: Fix cone footprint estimation. 2017-08-10 15:43:48 +02:00
Clément Foucault
0ab8b93fdd Eevee: SSR: Blur Mipmaps more.
Cost is negligeable (Only 0.02 ms more) and it improve stability.
2017-08-10 15:43:48 +02:00
Clément Foucault
99f37bf2a2 Eevee: SSR: Refine Raytrace Algorithm.
We track the previous ray position offseted by the thickness. If the sampled depth is between this value and the current ray position then we have a hit.
This fixes rays that are almost colinear with the view vector. Thickness is now only important for rays that are comming back to the camera.

As a consequence, this simplify a lot of things.

Also include some refactor.
2017-08-10 15:43:48 +02:00
Clément Foucault
292f5ab758 Eevee: Correct Mipmap texel alignment.
Since we are working with non power of 2 textures, the mipmap level UV does not line up perfectly.
This resulted in skewed filtering and bad sampling of the min/max depth buffer.
2017-08-10 15:43:47 +02:00
Clément Foucault
e0078cd953 Eevee: Add Refraction via probes. 2017-08-10 15:43:47 +02:00
Clément Foucault
aaa469a403 Eevee: Small code codestyle and fixes.
Rename get_specular_dominant_dir to get_specular_reflection_dominant_dir.
Add Zero length N check everywhere.
2017-08-10 15:43:47 +02:00
Clément Foucault
8e36089e41 Eevee: LUT generation.
We generate a 3D lut to precompute the btdf intensity.
I decided to use a 64*64*16 (N dot V, ior, roughness) because the btdf varies less with roughness than with IOR.
We also remap the ior to better use the space in the LUT.
2017-08-10 15:43:47 +02:00
Clément Foucault
4ec58659ad Eevee: Add precomputed BTDF LUT. 2017-08-10 15:43:47 +02:00
Campbell Barton
ba4ffe90cd Manipulator: add compositor corner-pin widgets 2017-08-10 21:07:06 +10:00
Bastien Montagne
8c4ccab5fe Merge branch 'master' into blender2.8 2017-08-10 11:14:36 +02:00
Bastien Montagne
cf7a2c93e3 Cleanup & fix potential NULL pointer dereferencing. 2017-08-10 10:28:13 +02:00
Bastien Montagne
a152743ba3 Fix T52314: New ID copy code (rBrB9da7dfa1586d) Breaks node previews in compositor.
"Just" forgot to copy data block's name in 'NO_MAIN' case... *sigh*
2017-08-10 10:28:13 +02:00
Campbell Barton
464c045b31 Manipulator: grab3d option to align to view
Use for lamp-target, makes it easier to click on.
2017-08-10 16:35:45 +10:00
Campbell Barton
8520cb4af0 Manipulator: cage2d translate in 3D view support
Needed for moving image-empties.
2017-08-10 14:30:02 +10:00
Campbell Barton
5406109fbf Manipulator: add image-empty manipulator 2017-08-10 14:08:38 +10:00
Campbell Barton
d5289f9d80 Manipulator: apply cage2d scale before offset
Needed when offset takes factor into account.
2017-08-10 14:03:37 +10:00
Campbell Barton
535d917870 Manipulator: expose use_draw_offset_scale to RNA 2017-08-10 09:59:17 +10:00
Campbell Barton
1d6b99b157 Cleanup: don't abbreviate color w/ manipulator API 2017-08-10 09:59:12 +10:00
Campbell Barton
7cb65cc038 Manipulator: rename grab enum
We'll want some 3D shapes, so name existing shapes 2D
2017-08-10 09:44:42 +10:00
Campbell Barton
5fac99ca7a Manipulator: use offset-scale for lamp target 2017-08-09 23:49:27 +10:00
Campbell Barton
2f20b5242c Manipulator: disable cursor grabbing for 2D groups
We could make this a manipulator type flag,
for now disable for all 2D manipulators since its annoying for cage2d.
2017-08-09 23:39:08 +10:00
Sybren A. Stüvel
6883f10f14 Merge branch 'master' into blender2.8 2017-08-09 15:08:06 +02:00
Sergey Sharybin
ed500ac8c7 Fix for previous commit
Accidentally got semicolon removed just before commit.
2017-08-09 15:00:47 +02:00
Sergey Sharybin
e00364c88e Fix strict compiler flags on 32bit Linux 2017-08-09 14:58:49 +02:00
Campbell Barton
2ec865035c Error in last commit 2017-08-09 22:55:18 +10:00
Bastien Montagne
cb02f5250d Fix typo in new ID copying code. 2017-08-09 14:38:24 +02:00
Campbell Barton
8403ec5160 Manipulator: Add function to calculate matrix
Each manipulator was doing this slightly differently,
use shared function which can optionally override each matrix.
2017-08-09 22:34:08 +10:00
Sybren A. Stüvel
45d7513f84 Fix T52240: Alembic Not Transferring Materials Per Frame
When a mesh changes its number of vertices during the animation,
Blender rebuilds the DerivedMesh, after which the materials weren't
applied any more (causing the default to the first material slot).
2017-08-09 13:59:58 +02:00
Sybren A. Stüvel
cdfeebd139 Alembic: Renamed variable assigned_name → assigned_mat
The variable is a pointer to a Material, not to a name/string.
2017-08-09 13:59:58 +02:00
Sybren A. Stüvel
422dc1ea1f Typo fix 2017-08-09 13:59:58 +02:00
Campbell Barton
b5e6a21f1d Cleanup: Quiet warning 2017-08-09 20:24:51 +10:00
Bastien Montagne
8c488cb97f Fix T52315: Crash on duplicating Scene without world.
Regression from rBa7b3047cefcbf, to be backported to 2.79.

Like... seriously... :|
2017-08-09 10:55:30 +02:00
Campbell Barton
3f644682b0 Manipulator: add sun-beam node manipulator 2017-08-09 18:08:10 +10:00
Campbell Barton
d186ab6560 Manipulator: grab3d - support for 2d views
Also internal changes so arrow3d matches grab3d's behavior.

Needed to add WM_MANIPULATOR_DRAW_OFFSET_SCALE flag so
we can optionally apply offset in worldspace or screen scaled values.
2017-08-09 18:07:55 +10:00
Campbell Barton
f0d4420cc0 Fix spin rotate axis
Also disable lamp-target for cameras (might enable later).
2017-08-09 18:02:10 +10:00
Campbell Barton
00f22403ac Manipulator: replace hard coded color w/ theme 2017-08-09 18:02:10 +10:00
Sergey Sharybin
fdb1c81117 Merge branch 'master' into blender2.8 2017-08-09 09:12:16 +02:00
Lukas Stockner
f2728939df Fix T52280: The Image node in Compositing can't read Z buffer of openEXR in 2.79
As part of the fix for T51587, I removed the Depth output for non-Multilayer
images since it seemed weird that PNGs etc. that don't have a Z pass still get
a socket for it.
However, I forgot about non-multilayer EXRs, which are a special case that can
actually have a Z pass.

Therefore, this commit brings back the Depth output for non-multilayer images
just like it was in 2.78.
2017-08-09 00:29:23 +02:00
Bastien Montagne
8563494823 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/modifiers/intern/MOD_meshsequencecache.c
2017-08-08 19:16:25 +02:00
Bastien Montagne
b6d7cdd3ce Fix T51701: Alembic cache screws up mesh.
Use same trick as in DataTransfer modifier e.g. to avoid modifying
existing mesh's data.
2017-08-08 18:22:24 +02:00
Bastien Montagne
e8b6bcd65c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
	source/blender/editors/object/object_add.c
	source/blender/python/intern/bpy_app_handlers.c
2017-08-08 16:43:25 +02:00
Aleksandr Zinovev
4fe1bf85af Fix fixed width box layouts
Regression, to be backported in 2.79.
2017-08-08 17:37:51 +03:00