Commit Graph

1854 Commits

Author SHA1 Message Date
Clément Foucault
2faa809ea6 GPU: Fix typo. 2018-03-06 16:45:23 +01:00
Clément Foucault
3a209c2857 DRW: Deferred compilation initial implementation. 2018-03-06 16:44:04 +01:00
Campbell Barton
b5cc55c822 Merge branch 'master' into blender2.8 2018-03-01 16:48:13 +11:00
Campbell Barton
172614fb7d GPU_select: remove unused finalize function
Changed 2.8x code so this is no longer needed.
2018-03-01 16:43:45 +11:00
Clément Foucault
1ba96857d1 DRW: Merge calls_generate pool with calls pool & add DRWCallState pool. 2018-03-01 03:53:25 +01:00
Brecht Van Lommel
33b6f944c6 Merge branch 'master' into blender2.8 2018-02-28 21:34:09 +01:00
Brecht Van Lommel
c0d6627dc5 Merge branch 'master' into blender2.8 2018-02-28 03:11:17 +01:00
Brecht Van Lommel
2329cc09e6 Code cleanup: make viewport free simpler and consistent with GPU module. 2018-02-28 03:04:15 +01:00
Campbell Barton
6bd53cb541 Cleanup: comment for depth picking code, const args
Note that setting `glDepthFunc` isn't important,
since 2.8 branch changes this value it might seem like an error
however it's harmless in this case - so better make note of this.
2018-02-28 11:47:54 +11:00
Campbell Barton
6addaf7393 Cleanup: use 'uint' for GPU_select 2018-02-28 11:37:39 +11:00
Campbell Barton
aa592cc00c Merge branch 'master' into blender2.8 2018-02-27 20:45:33 +11:00
Campbell Barton
a7ef312611 GPU_select: correction to select-pick-finalize
Would run twice, harmless at the moment but could cause issues later.
2018-02-27 20:44:12 +11:00
Campbell Barton
efef0ee672 Merge branch 'master' into blender2.8 2018-02-27 20:24:02 +11:00
Campbell Barton
4de50d7572 GPU_select: utility function to finalize selection
Needed for depth picking in 2.8
2018-02-27 20:16:53 +11:00
Clément Foucault
fa7e4cc685 WM/GPU: Clear VAO cache of batch preset when switching context.
This is needed for multiple windows to draw the batch presets.
This will not be needed once we use only one context for UI.
2018-02-26 19:49:06 +01:00
Clément Foucault
13261304a3 DRW: Add new Draw Manager OpenGL Context.
This separate context allows two things:
- It allows viewports in multi-windows configuration.
- F12 render can use this context in a separate thread and do a non-blocking render.

The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future.

Under the hood what does that mean:
- Not adding more mess with VAOs management in gawain.
- Doing depth only draw for operators / selection needs to be done in an offscreen buffer.
- The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it.
- All FBOs needed by the drawmanager must to be created/destroyed with its context active.
- We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.
2018-02-26 19:41:17 +01:00
Brecht Van Lommel
38ccd1fe33 Eevee: add Principled Volume shader. 2018-02-23 19:10:24 +01:00
Brecht Van Lommel
77062e8bbb Eevee: add blackbody shader node support.
This replaces the blackbody to RGB code with the simpler and faster one from
Cycles. It's a little different but the other placing using this is the legacy
volume drawing, so no need to stay compatible with that.
2018-02-23 19:10:24 +01:00
Brecht Van Lommel
57609993d0 GPU: fixes for string socket types in shader nodes.
These are not passed to GLSL functions, but should be used to load e.g.
a texture or attribute.
2018-02-23 19:10:24 +01:00
Brecht Van Lommel
af061b4dac Eeevee: add temperature grid support, make color grid unpremultiplied.
This matches similar changes done for Cycles.
2018-02-23 19:10:02 +01:00
Campbell Barton
2bc952fdb6 Merge branch 'master' into blender2.8 2018-02-18 22:33:05 +11:00
Brecht Van Lommel
cbd0e09898 Fix GL_FRAMEBUFFER_UNSUPPORTED warning in console on macOS. 2018-02-17 14:12:54 +01:00
Germano
fa0e89b9e8 Metalball drawing: rename mball helpers to handles
and also rename some related functions
2018-02-16 02:01:09 -02:00
Campbell Barton
ca5fdd857b Merge branch 'master' into blender2.8 2018-02-16 01:17:43 +11:00
Campbell Barton
2aef87bfae Cleanup: rename BLI_thread.h API
- Use BLI_threadpool_ prefix for (deprecated)
  thread/listbase API.
- Use BLI_thread as prefix for other functions.

See P614 to apply instead of manually resolving conflicts.
2018-02-16 01:13:46 +11:00
Sergey Sharybin
df1c88b652 Merge branch 'master' into blender2.8 2018-02-15 14:15:55 +01:00
Campbell Barton
ccdacf1c9b Cleanup: use '_len' instead of '_size' w/ BLI API
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
  (hint this isn't a simple getter).

See P611 to apply instead of manually resolving conflicts.
2018-02-15 23:39:08 +11:00
Campbell Barton
b8b8669b28 Cleanup: style, warning 2018-02-15 18:03:55 +11:00
Brecht Van Lommel
e6386ed286 Merge branch 'master' into blender2.8 2018-02-14 21:49:13 +01:00
Brecht Van Lommel
b5fe00d1ac Cycles: restore Particle Info Index for now, keep it next to Random.
It seems to be useful still in cases where the particle are distributed in
a particular order or pattern, to colorize them along with that. This isn't
really well defined, but might as well avoid breaking backwards compatibility
for now.
2018-02-14 21:45:57 +01:00
Clément Foucault
01244df007 DRW: Refactor: Make use of the new Gawain long attrib support. 2018-02-14 18:59:42 +01:00
Brecht Van Lommel
3102bf2889 Merge branch 'master' into blender2.8 2018-02-14 15:16:50 +01:00
Brecht Van Lommel
f6107af4cf Cycles: change Index output of Hair and Particle Info to Random, in 0..1 range.
These are used for randomization, so it's convenient if the index is already
hashed and consistent with the Object Info node.
2018-02-14 14:55:46 +01:00
Brecht Van Lommel
618bc6c679 GPU: use alpha blend that works for drawing to transparent buffer.
It's unlikely to ever be intentional to square the source alpha, as happens
with glBlendFunc, so this changes the blending throughout the code.
2018-02-14 14:00:57 +01:00
Brecht Van Lommel
7028a11db9 GPU: don't use multisample for entire window, only for offscreen 3D viewport.
Now that the new 3D viewport draws to a multisample offscreen buffer, there is
no good reason anymore to create an entire multisample window and pay the
performance/memory cost for other regions that don't need it.

GL_MULTISAMPLE now only gets enabled for offscreen buffers, so we don't need
to check for it throughout the UI code anymore.

Differential Revision: https://developer.blender.org/D3062
2018-02-14 14:00:48 +01:00
Brecht Van Lommel
6e040b045a GPU: add offscreen buffer drawing utility functions. 2018-02-13 20:02:31 +01:00
Brecht Van Lommel
e9b1163162 Code cleanup: stop using rectangle textures in window draw, simplify code. 2018-02-13 20:02:31 +01:00
Brecht Van Lommel
832f7a6648 Merge branch 'master' into blender2.8 2018-02-09 20:36:59 +01:00
Clément Foucault
708ef19d88 GPU: Remove Mesa + Vega hack.
This is not needed anymore with linux 4.15 + Mesa 17.3.3.
2018-02-07 05:44:05 +01:00
Campbell Barton
885d78150d Use eObjectMode for function arguments 2018-02-06 23:27:49 +11:00
Campbell Barton
c7fecab2ef Object Mode: Use eval_ctx mode for drawing, paint & modifiers 2018-02-06 18:03:28 +11:00
Brecht Van Lommel
1bc0cd0071 Merge branch 'master' into blender2.8 2018-02-03 16:10:01 +01:00
Brecht Van Lommel
f9ea097a87 Cycles: add Vector Displacement node and extend Displacement node.
This adds midlevel and object/world space for displacement, and a
vector displacement node with tangent/object/world space, midlevel
and scale.

Note that tangent space vector displacement still is not exactly
compatible with maps created by other software, this will require
changes to the tangent computation.

Differential Revision: https://developer.blender.org/D1734
2018-02-03 12:20:26 +01:00
Clément Foucault
269d9eb54c Eevee: Render: Fix emission shader normal output 2018-02-03 02:19:10 +01:00
Clément Foucault
c95f3a3616 Eevee: Render: Fix Normals of refraction shader. 2018-02-01 18:09:17 +01:00
Germano
11f9a23a28 Merge branch 'master' into blender2.8 2018-01-31 22:34:29 -02:00
Germano
42ca1fe89c gpu_shader_material: Correct incorrect glsl texture of Voronoi, Noise, and Musgrave on some Intel GPUs 2018-01-31 22:31:08 -02:00
Clément Foucault
76135d6b72 Eevee: Fix indentation and fix output normal of emission shader. 2018-01-31 02:53:02 +01:00
Campbell Barton
992ac8f942 Fix for fix w/ GPU_batch_wire_from_poly_2d_encoded
Was missing first edge
2018-01-25 00:47:01 +11:00
Campbell Barton
d8b5b4b7b1 Fix bug in view navigation icons
Own error in GPU_batch_wire_from_poly_2d_encoded
Wasn't correctly filling in the VBO with edges.
2018-01-24 22:58:02 +11:00