Commit Graph

60051 Commits

Author SHA1 Message Date
Germano
2a0dca4252 UI: Fix widget shader on certain compiler.
There was a crash with `Intel(R) HD Graphics 4000`.
Thanks to @fclem for the help and review.
2018-04-09 13:45:17 -03:00
Sybren A. Stüvel
c1a2f973da Merge branch 'master' into blender2.8 2018-04-09 15:44:28 +02:00
Sybren A. Stüvel
7e39d151d8 Added support for the WEBM/VP9 video codec
WEBM is the codec name, and VP9 is the encoder (the older encoder "VP8"
is less efficient than VP9).

WEBM/VP9 and h.264 both have options to control the file size versus
compression time (e.g. fast but big, or slow and small, for the same
output quality). Since WEBM/VP9 only has three choices, I've chosen to
map those to 3 of the 9 possible choices of h.264:

- BEST → SLOWER
- GOOD → MEDIUM
- REALTIME → SUPERFAST

The VERYSLOW and ULTRAFAST options give very little extra benefit.

Reviewed by: @Severin
2018-04-09 15:27:11 +02:00
Sybren A. Stüvel
39116a4340 Remove commented-out code 2018-04-09 15:26:12 +02:00
Brecht Van Lommel
d533b70b23 Fix build error with GCC, make depsgraph iterator compatible with C++. 2018-04-09 15:09:22 +02:00
Julian Eisel
867f96c234 Fix crash and invalid context when changing workspace
Caused by 1c24c04e60.
2018-04-09 13:19:19 +02:00
Campbell Barton
09ee3eb173 Merge branch 'master' into blender2.8 2018-04-09 12:44:25 +02:00
Campbell Barton
2872965652 Cleanup: avoid recalculating global center 2018-04-09 12:40:10 +02:00
Clément Foucault
3cb42e5917 GPU Codegen: Fix assert caused by GC of failled shaders. 2018-04-09 12:10:03 +02:00
Clément Foucault
020c4e19f2 BLF: Fix assert when drawing very small chars. 2018-04-09 12:10:03 +02:00
Brecht Van Lommel
209c5cebb0 Freestyle: use depsgraph to get geometry, instead of Blender Internal.
Some of the code is simpler because we use Blender's triangulation directly
instead of dealing with quads. Also some progress printing code was removed
because the depsgraph can not tell us the number of objects ahead of time.

Differential Revision: https://developer.blender.org/D3127
2018-04-09 11:21:14 +02:00
Clément Foucault
cf4041eb05 UI: Widgets: Fix text edit cursor not drawing.
Actually it was drawn before the widget. Flushing widget cache and
everything is fine again.
2018-04-08 18:54:34 +02:00
Clément Foucault
9960feb7e3 GPU Select: Remove warnings on Intel GPU.
- Disable scissor test for fast clear. This could lead to some issues but
   I cannot think of one and could not find one either.
 - Manually wait for queries to be available instead of making the driver
   wait and issue warnings.
2018-04-08 18:31:50 +02:00
Clément Foucault
fc6b69bedc UI: Perf: Use GWN_draw_primitive for drawing viewport textures. 2018-04-08 18:31:50 +02:00
Clément Foucault
0b06e73258 UI: Perf: Use GWN_draw_primitive for drawing triple buffers texture. 2018-04-08 18:31:50 +02:00
Clément Foucault
17aad5ad97 UI: Perf: View3D: Batch view infos BLF calls together. 2018-04-08 18:31:50 +02:00
Clément Foucault
ccbc14d995 UI: Perf: Batch horizontal scrollers numbers together. 2018-04-08 18:31:50 +02:00
Clément Foucault
651ea84471 Clay: Improve loading time.
Only compile hair shader if we need it.
2018-04-08 18:31:50 +02:00
Sybren A. Stüvel
e9f048052f Merge branch 'master' into blender2.8 2018-04-08 17:54:07 +02:00
Sybren A. Stüvel
d6a1a0ebb8 Alphabetically ordered audio and video codecs 2018-04-08 17:52:30 +02:00
Clément Foucault
afbc73ab72 BLF: Perf: Use BLF_KERNING_STEP_FAST for other functions. 2018-04-08 15:57:24 +02:00
Clément Foucault
47cfdb3c0c Eevee: Reduce loading time.
Only compile the needed shadow shaders to reduce the startup time.

Theses shaders is taking forever to compile on intel (~5s each).
2018-04-08 15:57:24 +02:00
Clément Foucault
0c9bc69f42 DRW: Profiling: Batch BLF strings and add shadowing
Shadows makes it more readable and are relatively cheap now.
2018-04-08 15:57:24 +02:00
Clément Foucault
6b109da114 BLF: Fix BlenderPlayer compilation. 2018-04-08 15:57:24 +02:00
Sybren A. Stüvel
a981206fd1 Merge branch 'master' into blender2.8 2018-04-08 14:07:34 +02:00
Sybren A. Stüvel
245e01c30a Encoding panel clarifications
The encoding panel mentions "None" in a few places, which is confusing.
- "Codec: None" now reads "No Video"
- "Audio Codec: None" now reads "No Audio"
- "Output Quality: None; ..." now reads "Constant Bitrate"

When selecting "No Video" the remaining video encoding options are
hidden, making it even more explicit that there will not be video in the
output file.

The label "Codec" now reads "Video Codec" for symmetry with "Audio
Codec".
2018-04-08 13:46:29 +02:00
Clément Foucault
0b5ebb3265 BLF: Fix problem with bound texture.
Previous code was assuming that the glyph texture would remain bound to
GL_TEXTURE0 until the cache would be drawn. This is not always the case,
so better save the texture and rebind it before drawing.
2018-04-08 01:14:43 +02:00
Clément Foucault
3725d82cee BLF: Opti: More clever sampling for blured glyphs.
Reduce the number of sampled required for blurring by using filtered
texture samples.

This changes the result a bit but it is not noticable.
2018-04-08 01:00:55 +02:00
Clément Foucault
987c56c4b6 BLF: Opti: Draw only one quad per shadow/blurred glyph.
This port the Blurring of blf fonts to the final drawing shader.

We add a bit of extra padding to each glyph so that jittering the texture
coord does not sample the neighbor glyphs.
2018-04-08 00:44:35 +02:00
Clément Foucault
1a33707417 UI: Fix waveform widget text drawing.
Flush the text cache so that we have proper scissor test and ordering.
2018-04-07 14:03:32 +02:00
Clément Foucault
2d618974d1 UI: Perf: Port color widgets to batch.
This is more for completeness than perf.

Shader is tiny bit more complex but we get less overdraw and drawcalls.
2018-04-06 23:54:39 +02:00
Campbell Barton
4a2b64e43d Minor change to last commit 2018-04-06 18:17:18 +02:00
Campbell Barton
6b2cf4e86e Delete object crashed (missing NULL check)
Error in recent removal of workspace.object_mode
2018-04-06 18:15:51 +02:00
Clément Foucault
4e52724aa8 UI: Perf: Optimize F-curve handles drawing.
50% less time in my test when all handles are selected.
2018-04-06 15:39:09 +02:00
Clément Foucault
5441e4802a Style: Remove duplicated struct declaration. 2018-04-06 14:30:44 +02:00
Clément Foucault
39b654f4ff UI: Perf: Use widget base batching
Overall 10% more performance on general UI drawing time.

This commit can introduce ordering problem on some elements.
In this case you need to flush the widget cache to ensure the element that
is going to be drawn is drawn on top of any widget base.

To flush the cache use UI_widgetbase_draw_cache_flush.

This is already done for BLF and Icons.
2018-04-06 14:30:20 +02:00
Clément Foucault
21113ad834 UI: Perf: Add batching capability to widgets.
Similiar to how we batch Icons together. This is not enabled in this
commit.
2018-04-06 14:25:55 +02:00
Clément Foucault
fcb4aaf7a9 GPUShader: Add GPU_SHADER_2D_WIDGET_BASE_INST shader.
This will let us draw multiple widget base at once.
2018-04-06 14:22:20 +02:00
Gaia Clary
d2e1a14a57 Fix Collada: nullptr is a c++11 keyword. Changed to NULL 2018-04-06 13:06:46 +02:00
Gaia Clary
fe73c12990 Fix Collada: Import of animations for objects with multiple materials
When importing multiple materials for one object,
the imported material animation curves have all been
assigned to the first material in the object.

This fix also improves the console logging whenever the importer
finds a consistency problem with the imported animation data.
2018-04-06 12:42:38 +02:00
Campbell Barton
4de70da73a Cleanup: style, doxy headers 2018-04-06 10:47:39 +02:00
Clément Foucault
4a73127a2b UI: Perf: Improve ui_draw_dropshadow.
Replace the 12 iterations of UI_draw_roundbox_4fv with only one batch.

This mean less overdraw and less drawcalls.

I had to hack the opacity falloff curve manually to get approximatly the
same result as previous technique. I'm sure with a bit more brain power
somebody could find the perfect function.
2018-04-06 10:25:53 +02:00
Clément Foucault
80d4d71360 UI: Perf: Modify UI_draw_roundbox to use GWN_batch API.
This commit also rename and move a few thing to clean things up.

Major improvment is using one drawcall instead of 8 for UI_draw_roundbox_aa.
2018-04-06 10:25:53 +02:00
Julian Eisel
72e5082b67 UI: Add accelerator keys to quit confirmation popup 2018-04-05 19:15:37 +02:00
Sergey Sharybin
ba821ad2ad Depsgraph: Avoid build-time armature expanding
With index-based pchan evaluation we don't need to go into
a mess of expanding armature at relation construction time.
2018-04-05 18:40:10 +02:00
Campbell Barton
58ba5a65bc Cleanup: use string macros to avoid duplicate args 2018-04-05 18:39:23 +02:00
Campbell Barton
3a864f5ee4 BLI_string_utf8: macros that de-duplicate sizeof arg 2018-04-05 18:37:54 +02:00
Sergey Sharybin
025bf11a9f Merge branch 'master' into blender2.8 2018-04-05 18:25:05 +02:00
Campbell Barton
1c24c04e60 Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
2018-04-05 18:21:14 +02:00
Sergey Sharybin
9b8a92b874 Depsgraph: Pull indirect dependencies via pchan constraints
Was missing ID looper for pchan constraint.
2018-04-05 18:03:36 +02:00