Commit Graph

488 Commits

Author SHA1 Message Date
Dalai Felinto
a418e269c8 Draw manager: visibility of objects centers to mimic old 2.7x behaviour
We only show object center if object is selected, active or if viewport
has the "All Object Origins" options.

The viewport display options can migrate to renderlayer options.
However, we can mimic 2.7x as a compromise while the final design is
finalized.
2017-06-06 12:00:35 +02:00
Luca Rood
4e1257f2d8 Make particle size follow world space instead of screen space 2017-06-06 09:57:18 +02:00
Clément Foucault
2ebde4c82b Eevee: Optimize scene with a large number of objects.
Using a GHash to store the shgroup of every Material. This way we do not duplicates the DRWShadingGroups allocations on every object.
2017-06-05 22:05:37 +02:00
Campbell Barton
4ee9016e62 DwM: skip background-set objects w/ selection 2017-06-05 15:02:47 +10:00
Clément Foucault
c838dd9de6 Clay Engine: Improve sampling of SSAO
Replace completly random noise by Blue noisen, giving a better aspect.
Also randomize the distance in the sample direction to cover the whole distance even with 1 sample. Using another blue noise for this.
Replace spiral samples (that had tendency to align if the number of samples was near the chosen constant) with Hammersley samples that have good coverage even for low number of samples.
Use a UBO instead of Texture (a bit less latency) making things a tiny bit faster.
Move the noise data to the SceneLayerData, because each render layer can have a different sample count.
2017-06-04 23:11:48 +02:00
Clément Foucault
288b54b5a7 Eevee: Modify Blue Noise. 2017-06-04 21:45:41 +02:00
Clément Foucault
819b8adb94 Eevee: Move Spherical Harmonics to a new Probe UBO.
Keep data packing tight to prevent use of padding floats
2017-06-04 16:50:22 +02:00
Clément Foucault
28b597b6df Eevee: Material code refactor.
Separate material handling inside another file.
Make use of enums to identify shader variations.
Group all 64*64 LUTs into one array texture.
Only update world probe if world changes.
2017-06-04 12:12:58 +02:00
Clément Foucault
2851e91db4 Eevee: Cleanup. Group data functions into one file. 2017-06-03 00:54:01 +02:00
Clément Foucault
433bb91a37 Eevee: fix bad eye vector and get rid of two uniform 2017-06-03 00:54:01 +02:00
Clément Foucault
bc984fd09b Eevee: Reduce shadow map precision.
Since we only store linear distance now we don't need so much bytes per pixels.
2017-06-03 00:54:01 +02:00
Clément Foucault
403c6b1b8d Eevee: fix shadows artifact by clearing to max depth 2017-06-03 00:54:01 +02:00
Clément Foucault
d385ad3ce8 Eevee: fix light update when a shadow caster is deleted 2017-06-03 00:54:01 +02:00
Clément Foucault
0d52f8daea Eevee: Polishing of Exponential Shadow mapping
Added exponent parameter to tweak light bleeding.
Added depth bias to the shadow test.
Added better blurring using 32 samples.
2017-06-03 00:54:01 +02:00
Campbell Barton
68e5c082b8 Fix for crash/error drawing duplis
Drawing object centers used stack memory,
we don't want to draw these anyway so add check.
2017-06-03 02:21:10 +10:00
Dalai Felinto
824bf261f7 Initial implememtation for dupli objects
Now dupli groups, objects, particles, ... are all working.

This introduces a flag for the iterator to determine whether we go over
Set and dupli objects or not.

Important to remember to keep the iteration of DEG_ as readonly.

Cycles is not working well for dupli groups, and it's memleaking
for dupli particles. So for now we iterate over main objects and set
only, not dupli.

To change that go in rna_scene.c and:

-DEG_OBJECT_ITER(graph, ob, DEG_OBJECT_ITER_FLAG_SET)
+DEG_OBJECT_ITER(graph, ob, DEG_OBJECT_ITER_FLAG_ALL)

Review and suggestions by Sergey Sharybin
2017-06-02 10:45:45 +02:00
Campbell Barton
f8ea2c92db Suppress assert for meshes with no faces 2017-06-02 16:42:39 +10:00
Clément Foucault
f59b1179c5 Eevee: Tag shadow maps to update only when necessary.
Shadow maps are now only updated if one shadow casting object inside it's shadow bounds has been updated.
2017-06-01 23:54:36 +02:00
Clément Foucault
071315e21b DEG: Add per object update flag for Depsgraph.
This is in order to communicate what portion of this object has changed.
For now it's just a bool, but it will be extended later.
2017-06-01 23:54:36 +02:00
Campbell Barton
42e336728d Fix custom-bone display-at option 2017-06-01 13:54:29 +10:00
Campbell Barton
a5783d08f9 Resolve assert in weight paint mode w/ no weights 2017-06-01 13:37:18 +10:00
Campbell Barton
390648b984 DwM: Show wire only mesh objects 2017-06-01 02:26:24 +10:00
Campbell Barton
82276d6cf7 Fix bone selection (index can't skip hidden bones) 2017-05-31 23:29:04 +10:00
Clément Foucault
c2d81f257f Eevee: Put shadows and probes inside SceneLayerEngineData
This remove the duplication of data for each viewport improving memory usage.
2017-05-30 22:30:16 +02:00
Clément Foucault
e7fb013a60 Draw Manager: Add SceneLayerEngineData and use callbacks to clear runtime engine data 2017-05-30 22:30:16 +02:00
Clément Foucault
470d66397d Eevee: Fix ggx sun light. 2017-05-30 17:18:00 +02:00
Clément Foucault
5773f58762 Eevee: Replace Cubemaps by octahedron maps for env. probes.
This enables us to use 2D texture arrays for multiple probes.
There is a little artifact with very high roughness caused elongated pixel due to the projection (along every 90° meridian).
2017-05-29 22:04:30 +02:00
Luca Rood
818268b394 Fix own mistake with NULL materials in particles 2017-05-29 16:30:56 +02:00
Clément Foucault
ec90780767 Gawain: Add support for rendering using an instance batch (for particles) 2017-05-29 16:28:54 +02:00
Clément Foucault
97e89027fc Eevee : fix light colors 2017-05-29 15:52:27 +02:00
Clément Foucault
dbed33479a Eevee: Remove non-ltc area light code + optimisation.
Reduce size ShadingData struct leads to some improvement even with more computation.
2017-05-29 15:52:27 +02:00
Clément Foucault
932399612b 3D grid: Fix precision issue 2/2
We now floor the corner position and use this position as origin.
This gives us perfect derivatives in all cases even if very far from the origin.
Unfortunately this won't fix the low precision of coordinates used for computing the actual grid size, resulting in thick, non-smoothed lines.

Also did a bit of refactor how the axes are drawn.
2017-05-29 15:52:27 +02:00
Clément Foucault
330007f571 3D grid: only draw if needed. 2017-05-29 15:52:27 +02:00
Clément Foucault
e104d82376 Object Mode Engine: Fixing the 3D grid 1/2
Do not use the inverse perspective matrix inside the shader to recover world positions.
That leads to severe float imprecision leading to nasty artifacts.

Instead we compute the world view vector for each pixels and do a ray to plane intersection.
We are still getting low precision derivatives when going far away from the origin, and thus artifacts.

This commit also fixes the non-appearing negative Z axis in 3D view.
2017-05-29 15:52:27 +02:00
Sergey Sharybin
35022d0f63 Move particle cache population to a dedicated function
Should help readability of switch statement which becomes far too big now.
2017-05-29 15:26:52 +02:00
Campbell Barton
1f1926e068 Fix leak with texture-paint shaders 2017-05-29 20:48:02 +10:00
Campbell Barton
51d1e204b8 Fix texture paint crash when there are no UV's
Missing check in own recent commits,
also only use texture-paint drawing on active object.
2017-05-29 20:17:42 +10:00
Dalai Felinto
6dfe56f01a Silence warning in draw manager 2017-05-26 17:51:08 +02:00
Luca Rood
3b311b7cb2 Fix uninit shading group in object mode particles 2017-05-26 13:36:12 +02:00
Luca Rood
ff29914dcc Remove default shading groups from eevee 2017-05-26 12:55:50 +02:00
Luca Rood
f75ca733ed Fix indentation in clay_engine.c 2017-05-26 12:55:50 +02:00
Dalai Felinto
3b24ece297 Depsgraph: Rename DAG > DEG functions from depsgraph_query.cc 2017-05-26 11:23:10 +02:00
Campbell Barton
214c42157a Only calc split normals when auto-smooth is enabled
This matches cycles & derived-mesh
2017-05-25 02:31:39 +10:00
Campbell Barton
154ff1afde Fix/Workaround T51561: Disable split normals 2017-05-25 01:40:15 +10:00
Campbell Barton
707340edd7 Cleanup: minor de-duplicate from last commit 2017-05-24 22:54:19 +10:00
Campbell Barton
429f6bee28 Fix T51561: Normal maps fail w/ quad + eevee
Generalize derived-mesh tangent calculation so
it can be used by Batch cache creation too.
2017-05-24 22:39:50 +10:00
Campbell Barton
60a099fb09 Move empty image drawing into its own pass 2017-05-24 14:28:48 +10:00
Campbell Barton
3c92e6b8f0 Cleanup: bmesh var naming 2017-05-24 13:33:48 +10:00
Campbell Barton
c9d890585b DwM: avoid indirect edit-mesh conversion
Storing edit-mesh data as indices for passing
only to get back edit-mesh data.

This also complicated checks for real edges in tessellation tris.

Simpler to pass data directly.
2017-05-24 13:27:11 +10:00
Campbell Barton
c99e70ae6c Fix leak in particle velocity global ramp 2017-05-24 13:27:11 +10:00