2 years agoMerge branch 'blender2.7'
Sergey Sharybin [Tue, 22 Jan 2019 10:57:03 +0000 (11:57 +0100)]
Merge branch 'blender2.7'

2 years agoFix full compilation after recent passes changes
Sergey Sharybin [Tue, 22 Jan 2019 10:56:03 +0000 (11:56 +0100)]
Fix full compilation after recent passes changes

Was caused by c9eef249.

2 years ago3D View: Support edit-mesh clipping (only verts)
Campbell Barton [Tue, 22 Jan 2019 06:23:24 +0000 (17:23 +1100)]
3D View: Support edit-mesh clipping (only verts)

We'll need to replace built-in shaders to add support for clipping.

2 years agoFix T60112: Smooth crashes w/ multiple views
Campbell Barton [Tue, 22 Jan 2019 05:51:31 +0000 (16:51 +1100)]
Fix T60112: Smooth crashes w/ multiple views

2 years agoFix T60643: BMesh operator enum args fail when unset from Python
Campbell Barton [Tue, 22 Jan 2019 03:26:15 +0000 (14:26 +1100)]
Fix T60643: BMesh operator enum args fail when unset from Python

Error introduced with bmesh operator enum support: 1e6a5eb087911

2 years agoCleanup: minor changes to reduce code duplication
Campbell Barton [Tue, 22 Jan 2019 02:51:21 +0000 (13:51 +1100)]
Cleanup: minor changes to reduce code duplication

D4236 by @sobakasu w/ edits.

2 years agoCleanup: de-duplicate font loading code
Campbell Barton [Tue, 22 Jan 2019 02:09:17 +0000 (13:09 +1100)]
Cleanup: de-duplicate font loading code

Part of D4236 by @sobakasu

2 years agoCleanp: use single global for draw manager
Campbell Barton [Tue, 22 Jan 2019 01:09:27 +0000 (12:09 +1100)]
Cleanp: use single global for draw manager

Add 'G_draw' for all draw manager globals,
avoids adding extern to each file.

Connection between `ts` and `globals_ubo` wasn't obvious,
now called `G_draw.block` & `G_draw.block_ubo`.

2 years agoCleanup: use const args
Campbell Barton [Tue, 22 Jan 2019 01:08:33 +0000 (12:08 +1100)]
Cleanup: use const args

2 years agoFix error in last commit
Campbell Barton [Tue, 22 Jan 2019 00:24:27 +0000 (11:24 +1100)]
Fix error in last commit

2 years agoCleanup: use DRW_shader_create_from_arrays
Campbell Barton [Mon, 21 Jan 2019 23:39:35 +0000 (10:39 +1100)]
Cleanup: use DRW_shader_create_from_arrays

Avoids messy conditional defines and inline lib allocation.

2 years agoDRW: Add DRW_shader_create_from_arrays utility
Campbell Barton [Mon, 21 Jan 2019 23:29:46 +0000 (10:29 +1100)]
DRW: Add DRW_shader_create_from_arrays utility

While verbose, this is a more flexible way to construct shaders.

Libs & defines can be optionally included for each shader type
which was previously done with inline string creation.

2 years agoCleanup: remove redundant '_sh' suffix, add '_shgrp'
Campbell Barton [Mon, 21 Jan 2019 21:31:07 +0000 (08:31 +1100)]
Cleanup: remove redundant '_sh' suffix, add '_shgrp'

2 years agoCleanup: rename shader containers
Campbell Barton [Mon, 21 Jan 2019 21:26:43 +0000 (08:26 +1100)]
Cleanup: rename shader containers

These only contain shaders, so name Shaders instead of ShaderData.

2 years agoGP: Cleanup previous commit
Antonioya [Mon, 21 Jan 2019 17:30:15 +0000 (18:30 +0100)]
GP: Cleanup previous commit

2 years agoFix T60714: Avoid creation of nested objects
Antonioya [Mon, 21 Jan 2019 17:29:02 +0000 (18:29 +0100)]
Fix T60714: Avoid creation of nested objects

In grease pencil is not logic add an object inside other object in edit mode. The object must be created only in Object mode.

2 years agoGP: Fix memory leaks when use cutter with weights
Antonioya [Mon, 21 Jan 2019 16:38:47 +0000 (17:38 +0100)]
GP: Fix memory leaks when use cutter with weights

There were some issues when copy the weights and  other memory leaks.

Also some code cleanup.

2 years agoFix keymap preferences UI layout issues for modifier keys.
William Reynish [Mon, 21 Jan 2019 16:20:43 +0000 (17:20 +0100)]
Fix keymap preferences UI layout issues for modifier keys.

2 years agoFix T60683, T60662: Cycles render crash in edit mode for certain meshes.
Brecht Van Lommel [Mon, 21 Jan 2019 14:34:34 +0000 (15:34 +0100)]
Fix T60683, T60662: Cycles render crash in edit mode for certain meshes.

2 years agoDRW: Fix corner indices order in clipping plane setup
Clément Foucault [Mon, 21 Jan 2019 14:21:17 +0000 (15:21 +0100)]
DRW: Fix corner indices order in clipping plane setup

Fix T60667: Eevee: reflection plane bug in rendered view.

2 years agoFix clipping shaders with some AMD/Intel drivers
Campbell Barton [Mon, 21 Jan 2019 12:51:34 +0000 (23:51 +1100)]
Fix clipping shaders with some AMD/Intel drivers

    error: unsized array index must be constant

Use hard coded number of clipping planes, copying the 4th to 5 & 6
when only 4 are used.

2 years agoFix T60709: Apply Object Transform does nothing by default
Jacques Lucke [Mon, 21 Jan 2019 12:43:16 +0000 (13:43 +0100)]
Fix T60709: Apply Object Transform does nothing by default

Clément Foucault [Mon, 21 Jan 2019 11:50:57 +0000 (12:50 +0100)]

This makes it possible to have some code specific to each shader inside a
shader library.

2 years agoT60701: GP using cutter tool on stroke with vertex group crashes blender
Antonioya [Mon, 21 Jan 2019 10:02:24 +0000 (11:02 +0100)]
T60701: GP using cutter tool on stroke with vertex group crashes blender

2 years agoCleanup: add clarifying comments for recent NUMA fixes.
Brecht Van Lommel [Mon, 21 Jan 2019 09:51:19 +0000 (10:51 +0100)]
Cleanup: add clarifying comments for recent NUMA fixes.

2 years agoFix T55461: [Vertex Group] "Delete all unlocked groups" not working.
Bastien Montagne [Mon, 21 Jan 2019 09:35:55 +0000 (10:35 +0100)]
Fix T55461: [Vertex Group] "Delete all unlocked groups" not working.

2 years agoDRW: Support wire overlay clipping
Campbell Barton [Mon, 21 Jan 2019 08:08:42 +0000 (19:08 +1100)]
DRW: Support wire overlay clipping

2 years agoCorrect freeing builtin shader from recent commit
Campbell Barton [Mon, 21 Jan 2019 08:05:29 +0000 (19:05 +1100)]
Correct freeing builtin shader from recent commit

2 years agoFix T60704: Transparency threshold only half visible
Antonioya [Mon, 21 Jan 2019 07:59:42 +0000 (08:59 +0100)]
Fix T60704: Transparency threshold only half visible

2 years agoDRW: pass clipping to geom shader via 'gl_in'
Campbell Barton [Mon, 21 Jan 2019 06:48:16 +0000 (17:48 +1100)]
DRW: pass clipping to geom shader via 'gl_in'

Removes need to pass the worldspace location.

2 years agoCleanup: remove '_sh' suffix
Campbell Barton [Mon, 21 Jan 2019 06:00:18 +0000 (17:00 +1100)]
Cleanup: remove '_sh' suffix

Shaders are now stored in their own struct, no need for special names.

Also free as an array.

2 years agoDRW: Support edit-mesh clipping
Campbell Barton [Mon, 21 Jan 2019 04:57:10 +0000 (15:57 +1100)]
DRW: Support edit-mesh clipping

2 years agoCleanup: rename GPU function to set buffer length
Campbell Barton [Mon, 21 Jan 2019 00:28:41 +0000 (11:28 +1100)]
Cleanup: rename GPU function to set buffer length

2 years agoCleanup: rename terms count/num to len
Campbell Barton [Mon, 21 Jan 2019 00:24:19 +0000 (11:24 +1100)]
Cleanup: rename terms count/num to len

2 years agoCleanup: replace 'ct' w/ 'len'
Campbell Barton [Mon, 21 Jan 2019 00:20:53 +0000 (11:20 +1100)]
Cleanup: replace 'ct' w/ 'len'

2 years agoDRW: set 4 clipping planes for box-clip
Campbell Barton [Mon, 21 Jan 2019 00:12:26 +0000 (11:12 +1100)]
DRW: set 4 clipping planes for box-clip

2 years ago3D View: add back clipping border operator
Campbell Barton [Mon, 21 Jan 2019 00:05:15 +0000 (11:05 +1100)]
3D View: add back clipping border operator

2 years ago3D View: add back initial clipping support
Campbell Barton [Sun, 20 Jan 2019 23:43:01 +0000 (10:43 +1100)]
3D View: add back initial clipping support

Use clipping for workbench solid mode drawing.

Other modes & shading support still needs to be added.

2 years agoCleanup: trailing space
Campbell Barton [Sun, 20 Jan 2019 23:41:39 +0000 (10:41 +1100)]
Cleanup: trailing space

2 years agoCleanup: shadow warning, style
Campbell Barton [Sun, 20 Jan 2019 23:04:09 +0000 (10:04 +1100)]
Cleanup: shadow warning, style

2 years agoFix T60678: GP, smoothing a stroke's weights multiple times will lead to unweightable...
Antonioya [Sun, 20 Jan 2019 19:38:00 +0000 (20:38 +0100)]
Fix T60678: GP, smoothing a stroke's weights multiple times will lead to unweightable points

2 years agoFix T60677: GP vertex groups get messed up, when deleting a group
Antonioya [Sun, 20 Jan 2019 19:31:11 +0000 (20:31 +0100)]
Fix T60677: GP vertex groups get messed up, when deleting a group

2 years agoFix T60671: GP weight paint crash when smoothing weights
Antonioya [Sun, 20 Jan 2019 18:37:13 +0000 (19:37 +0100)]
Fix T60671: GP weight paint crash when smoothing weights

2 years agoGP: Fix mirror modifier with parent object
Antonioya [Sun, 20 Jan 2019 16:57:13 +0000 (17:57 +0100)]
GP: Fix mirror modifier with parent object

Still problems when local rotation.

Some cleanup done.

2 years agoCleanup: remove all BLI_utiledefines' ugly vectorial macros.
Bastien Montagne [Sun, 20 Jan 2019 15:22:55 +0000 (16:22 +0100)]
Cleanup: remove all BLI_utiledefines' ugly vectorial macros.

Not only were those often making doublons with already existing
BLI_math's stuff, but they were also used to hide implicit type

As usual this adds some more exotic inlined vector functions (one of
the rare cases where I really miss C++ and its templates... ;) ).

2 years agoFix bevel modifier spread value bug.
Howard Trickey [Sat, 19 Jan 2019 20:56:11 +0000 (15:56 -0500)]
Fix bevel modifier spread value bug.

Was using same field as value, by mistake.

2 years agoCleanup: add trailing commas
Campbell Barton [Sat, 19 Jan 2019 02:21:18 +0000 (13:21 +1100)]
Cleanup: add trailing commas

Prevents clang-format merging into a single line.

2 years agoMerge branch 'blender2.7'
Brecht Van Lommel [Fri, 18 Jan 2019 20:00:24 +0000 (21:00 +0100)]
Merge branch 'blender2.7'

2 years agoFix T60627: Cycles render hanging on Windows with threadripper CPU.
Sergey Sharybin [Fri, 18 Jan 2019 18:45:39 +0000 (19:45 +0100)]
Fix T60627: Cycles render hanging on Windows with threadripper CPU.

2 years agoFix T60585: Cycles not using all cores on threadripper, after recent changes.
Brecht Van Lommel [Fri, 18 Jan 2019 18:15:38 +0000 (19:15 +0100)]
Fix T60585: Cycles not using all cores on threadripper, after recent changes.

2 years agoFix T60585: Cycles not using all cores on threadripper, after recent changes.
Brecht Van Lommel [Fri, 18 Jan 2019 18:15:38 +0000 (19:15 +0100)]
Fix T60585: Cycles not using all cores on threadripper, after recent changes.

2 years agoAdd miter pattern options.
Howard Trickey [Fri, 18 Jan 2019 17:54:10 +0000 (12:54 -0500)]
Add miter pattern options.

Will document the new options in release notes, then in manual.
Still a bit of work to do on the bulging shape that appears
on cube corners if using arc inner miters, but will do that later.
Also need to do something smarter in clamp overlap.

2 years agoFix T60615: Cycles baking not working with some modifiers.
Brecht Van Lommel [Tue, 15 Jan 2019 12:03:09 +0000 (13:03 +0100)]
Fix T60615: Cycles baking not working with some modifiers.

Refactors Cycles mesh export a bit to avoid unnecessary copies and to be in
sync with the Blender baker.

2 years agoGP: Guides: Fix bug with Mkey and Circular guides
Charlie Jolly [Fri, 18 Jan 2019 15:50:16 +0000 (15:50 +0000)]
GP: Guides: Fix bug with Mkey and Circular guides

Reported by @pepeland.

Adding missing events on the first point was breaking the guide behaviour.
Also, updated Ckey so it always defaults to Circular mode when guides are off.

2 years agoView 3D Grid: Improve precision and reduce code complexity
Clément Foucault [Fri, 18 Jan 2019 15:29:52 +0000 (16:29 +0100)]
View 3D Grid: Improve precision and reduce code complexity

Instead of doing manual ray-plane intersection we use normalized positions
of the grid mesh and apply scaling after interpolation so that we keep
good precision even at really far distances.

Precision is now two order of magnitude better and does not produce the
same kind of artifact at lower clip start values.

This commit also cleanup the implementation.

Fixes T58918 Grid not appearing correctly at low clip start in 2.8

2 years agoPreferences: assortment of minor layout tweaks.
Brecht Van Lommel [Fri, 18 Jan 2019 10:31:26 +0000 (11:31 +0100)]
Preferences: assortment of minor layout tweaks.

2 years agoCycles: Fixed uninitialized memory
Stefan Werner [Fri, 18 Jan 2019 14:16:11 +0000 (15:16 +0100)]
Cycles: Fixed uninitialized memory

Cryptomatte on CPU with accurate mode was hitting uninitialized variables.
This is now explicitly initializing them to NULL.

2 years agoFix/workaround: Undo erase all dyntopo changes
Campbell Barton [Fri, 18 Jan 2019 13:48:00 +0000 (00:48 +1100)]
Fix/workaround: Undo erase all dyntopo changes

Memfile undo isn't compatible with sculpt or edit-mode.

This didn't work in 2.7x, so best disable memfile undo for now in
situations where it's going to loose data or crash.

2 years agoFix loading a file saved w/ dyntopo
Campbell Barton [Fri, 18 Jan 2019 12:15:22 +0000 (23:15 +1100)]
Fix loading a file saved w/ dyntopo

Ensure ED_editors_init doesn't create any undo steps
before the initial memfile undo is written.

2 years agoFix undo push entering sculpt mode
Campbell Barton [Fri, 18 Jan 2019 12:15:00 +0000 (23:15 +1100)]
Fix undo push entering sculpt mode

2 years agoCleanup: remove unnecessary CUDA architecture sm_72, it's for Tegra chips.
Brecht Van Lommel [Fri, 18 Jan 2019 11:38:19 +0000 (12:38 +0100)]
Cleanup: remove unnecessary CUDA architecture sm_72, it's for Tegra chips.

2 years agoSubdiv CCG: Cleanup, comments
Sergey Sharybin [Fri, 18 Jan 2019 10:28:38 +0000 (11:28 +0100)]
Subdiv CCG: Cleanup, comments

2 years agoMultires: Correct averaging
Sergey Sharybin [Thu, 17 Jan 2019 17:09:47 +0000 (18:09 +0100)]
Multires: Correct averaging

Before that only normal component was averaged, which is not
really correct.

Unfortunately, the new code is somewhat slower due to more
involved math to deal properly with non-quad faces, but the
plan is to move averaging from runtime to edit time, This
means, that mdisps will always be continuous around the edges
and no averaging on every frame change of animated character
will be needed.

2 years agoMath: Make it possible to use vector for both input and output
Sergey Sharybin [Thu, 17 Jan 2019 14:41:27 +0000 (15:41 +0100)]
Math: Make it possible to use vector for both input and output

Avoids nasty code all over where such math is required, and
compilers can easily deal with such situation.

Don't prefer questionable micro-optimization which comes with
a cost of nasty actual logic code.

2 years agoMultires: Ensure continuity when reshaping from object
Sergey Sharybin [Thu, 17 Jan 2019 14:08:41 +0000 (15:08 +0100)]
Multires: Ensure continuity when reshaping from object

2 years agoSubdiv: Fix wrong corner passed to a callback
Sergey Sharybin [Thu, 17 Jan 2019 11:55:51 +0000 (12:55 +0100)]
Subdiv: Fix wrong corner passed to a callback

2 years agoMultires: Simplify reshaping code
Sergey Sharybin [Thu, 17 Jan 2019 11:06:26 +0000 (12:06 +0100)]
Multires: Simplify reshaping code

The idea is to run reshaping for every boundary vertex
of a grid rather than trying to copy boundary grid

While this is somewhat slower, this avoids all this
tangent flipping magic, which tempts to be rather tricky
and fragile.

2 years agoMultires: Correct function name, to match behavior
Sergey Sharybin [Thu, 17 Jan 2019 10:17:15 +0000 (11:17 +0100)]
Multires: Correct function name, to match behavior

2 years agoMultires: Fix spike issues when sculpting on triangles
Sergey Sharybin [Thu, 17 Jan 2019 09:49:43 +0000 (10:49 +0100)]
Multires: Fix spike issues when sculpting on triangles

The boundary copy code was not dealing correct with flipping
tangent vectors, hence causing discontinuity in the final

Now we only copy boundaries for quads, where we know how to
deal with tangent vectors and where we know that this is

More clear solution could be to change the code in a way that
handles handles displacement grids of quads in the same way
as it's done for non-quad faces.

2 years agoMultires: Cleanup, move utility function to a more public place
Sergey Sharybin [Thu, 17 Jan 2019 09:47:14 +0000 (10:47 +0100)]
Multires: Cleanup, move utility function to a more public place

2 years agoMultires: Cleanup, more clear naming
Sergey Sharybin [Thu, 17 Jan 2019 09:41:40 +0000 (10:41 +0100)]
Multires: Cleanup, more clear naming

2 years agoGP: Create materials when separate active layer
Antonioya [Fri, 18 Jan 2019 09:52:38 +0000 (10:52 +0100)]
GP: Create materials when separate active layer

The materials were not created when used the active layer option of the separate operator.

2 years agoDRW: Increase frustum culling precision
Clément Foucault [Fri, 18 Jan 2019 09:22:11 +0000 (10:22 +0100)]
DRW: Increase frustum culling precision

Use normal_quad_v3 instead of normal_tri_v3 and compute the mean of all
corner distance during frustum plane extraction.

Fix T58243 Flickering of viewport when rotating and zooming

2 years agoDRW: Fix assert when using draw debug API
Clément Foucault [Fri, 18 Jan 2019 08:58:04 +0000 (09:58 +0100)]
DRW: Fix assert when using draw debug API

2 years agoFix T60608: Popup dialogs Y-axis reset after drag
Campbell Barton [Fri, 18 Jan 2019 05:55:18 +0000 (16:55 +1100)]
Fix T60608: Popup dialogs Y-axis reset after drag

Caused by fc32bd729c5b7

2 years ago3D View: Disable clipping on load
Campbell Barton [Fri, 18 Jan 2019 02:30:31 +0000 (13:30 +1100)]
3D View: Disable clipping on load

Having clipping limit selection and tools is confusing when not visible.

Disable on load until it's supported
(doing this via ifdef's isn't practical).

Fixes T59580

2 years agoCycles: Cast to correct base type when checking requested features
Lukas Stockner [Fri, 18 Jan 2019 01:56:59 +0000 (02:56 +0100)]
Cycles: Cast to correct base type when checking requested features

2 years agoCleanup: use enum for color picker types
Campbell Barton [Fri, 18 Jan 2019 01:34:11 +0000 (12:34 +1100)]
Cleanup: use enum for color picker types

2 years agoFix eye-dropper causing undo push w/o any changes
Campbell Barton [Fri, 18 Jan 2019 01:07:04 +0000 (12:07 +1100)]
Fix eye-dropper causing undo push w/o any changes

Happened when accessing the eyedropper from a popup.

2 years agoFix undo pushes w/ color picker
Campbell Barton [Fri, 18 Jan 2019 01:05:09 +0000 (12:05 +1100)]
Fix undo pushes w/ color picker

While changing RGBA or color wheel didn't add undo steps,
HSV and Hex values did.

Disable undo for these button types since an undo push happens when
exiting the picker.

2 years agoMerge branch 'blender2.7'
Lukas Stockner [Fri, 18 Jan 2019 00:47:32 +0000 (01:47 +0100)]
Merge branch 'blender2.7'

2 years agoFix T56799: Custom render passes missing when using Save Buffers
Lukas Stockner [Thu, 17 Jan 2019 23:45:21 +0000 (00:45 +0100)]
Fix T56799: Custom render passes missing when using Save Buffers

The problem here was that when a render result is allocated, the standard render passes are added according to the
pass bitfield. Then, when the render engine sets the result, it adds the additional passes which are then merged
into the main render result.

However, when using Save Buffers, the EXR is created before the actual render starts, so it's missing all those
additional passes.

To fix that, we need to query the render engine for a list of additional passes so they can be added before the EXR
is created. Luckily, there already is a function to do that for the node editor.

The same needs to be done when the EXR is loaded back.

Due to how that is implemented though (Render API calls into engine, engine calls back for each pass), if we have
multiple places that call this function there needs to be a way to tell which one the call came from in the pass
registration callback. Therefore, the original caller now provides a callback that is called for each pass.

2 years agoRender API: Fix detection of duplicate render passes
Lukas Stockner [Thu, 17 Jan 2019 23:40:05 +0000 (00:40 +0100)]
Render API: Fix detection of duplicate render passes

2 years agoUI: only reset eyedropper on cancel when set
Campbell Barton [Thu, 17 Jan 2019 22:31:39 +0000 (09:31 +1100)]
UI: only reset eyedropper on cancel when set

2 years agoFix color picker cancel setting the color to black
Campbell Barton [Thu, 17 Jan 2019 22:29:47 +0000 (09:29 +1100)]
Fix color picker cancel setting the color to black

2 years agoCleanup: style
Campbell Barton [Thu, 17 Jan 2019 21:59:41 +0000 (08:59 +1100)]
Cleanup: style

2 years agoAudaspace: porting changes from upstream.
Jörg Müller [Thu, 17 Jan 2019 20:17:30 +0000 (21:17 +0100)]
Audaspace: porting changes from upstream.

- Silence some warnings.
- Fix: Python API memory leak.
- Fix for T54490: VSE breaks when I insert or remove headphones

2 years agoPhysically based defaults for Eevee Bloom and Shutter
Clément Foucault [Thu, 17 Jan 2019 18:54:49 +0000 (19:54 +0100)]
Physically based defaults for Eevee Bloom and Shutter

Some of Eevee's Bloom defaults are not very good for physically based rendering. This patches addresses this issue.

This picture shows one of the problems with current default. Bloom looks very foggy:
Even worse, light emitters much dimmer than the Sun can make everything equally hazy if Clamp is set to 1.0 and intensity to 0.8 (current default). Artists often forget to adjust Clamp value and do not know what value to use for realistic intensity. Also, currently both Clamp and Intensity do not have good UI ranges. This is why often Eevee renders end up very hazy and bloom often does not look right.

Bloom effect plays important role to help to distinguish between bright and relatively dim light sources. With current defaults this is broken because Clamp set to 1.0. Also, it cannot be disabled if set to 0 like expected. This patch fixes this and sets it to 0 by default. If users need to clamp, they can do so easily with UI range up to 1000. This range is good enough for most cases and provides enough precision to control lower values, and the highest value helps to limit bloom from the Sun if necessary and will leave untouched most other light emitters. If needed, much higher values for Clamp can be entered manually up to 100000. 10000 is still affects the Sun, but up to 100000 highest limit allows to clamp anything that is much brighter than the Sun if user needs to limit bloom in such cases (for example, bright explosion in the sky or anything else very bright).

I propose new default for bloom Intensity - 0.05 and UI range to suggests realistic values. Bloom Intensity > 0.1 is not realistic for clean lens but the user can enter manually much larger values if needed.

For comparison, here is a my own photo with and without bloom caused by the Sun (on second photo the Sun was occluded with an object).
In real life bloom is much more subtle and does not look hazy. If Clamp is disabled, then out of 0.1, 0.05 and 0.025 values I have tried, 0.05 looks most similar to the photo. Here is test render with and without bloom with the Sun in similar position like on the photo:
Using color probe 27x27 I compared lightness below the horizon under the Sun. In rendered by Eevee images lightness difference was 17. In case of the photos lightness difference in similar place was 11. I then compared leftmost spot (also below the horizon) and lightness difference was approximately 2 between two photos and 1 between rendered images. In other words, with these settings bloom effect is not too strong and is not too weak. Visually it may seem like decreasing bloom intensity may increase photorealism, but then bloom effect would be too localized even for the Sun.

Besides this single test, I tested in many other scenes as well, with and without the Sun, with different HDRIs, and as far as I can tell 0.05 intensity turned out to be good default - it produces bloom strong enough to be noticeable and not too hazy.

In Cycles shutter default value is 0.50, so for consistency set to 0.5 by default in Eevee too. Besides, 0.5 is typical standard for real cameras, and values higher than 0.5 usually are needed only if very strong motion blur is desired.

Here is summary of all changes:

Bloom Intensity: 0.8 > 0.05
Bloom Intensity UI range: 0-10 > 0-0.1
Bloom Clamp: 1.0 > 0.0 (disabled by default)
Bloom Clamp manual range: 0-1000 > 0-100000
Bloom Clamp UI range: 0-10 > 0-1000
Shutter: 1.0 > 0.5

This patch is related to the discussion in this thread, there are more examples of what bloom will look like with 0.05 intensity by me and others:

Reviewers: fclem

Reviewed By: fclem

Subscribers: pablovazquez, billreynish, rboxman

Tags: #eevee

Differential Revision:

2 years agoGPUInterface: Add builtin check in uniform location request.
Clément Foucault [Thu, 17 Jan 2019 18:42:17 +0000 (19:42 +0100)]
GPUInterface: Add builtin check in uniform location request.

This is a compile time option to remove the unecessary uniform queries.

2 years agoDRW: Make missing uniform debuging print only once
Clément Foucault [Thu, 17 Jan 2019 18:39:27 +0000 (19:39 +0100)]
DRW: Make missing uniform debuging print only once

2 years agoDRW: Use name buffer to request uniform location before drawing.
Clément Foucault [Thu, 17 Jan 2019 17:33:08 +0000 (18:33 +0100)]
DRW: Use name buffer to request uniform location before drawing.

This is in order to avoid GL call during the "cache creation" phase and
support multithreading.

2 years agoFix T60545: Buffer overflow in selection batch creation
Clément Foucault [Thu, 17 Jan 2019 13:37:59 +0000 (14:37 +0100)]
Fix T60545: Buffer overflow in selection batch creation

Use loose_edges and loose_verts buffer instead of detecting them manually.

2 years agoGPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
Clément Foucault [Wed, 16 Jan 2019 03:41:27 +0000 (04:41 +0100)]
GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure

This is in order to make the API more multithread friendly inside the
draw manager.

GPU_shader_get_uniform will only serve to query the shader interface and
not do any GL call, making it threadsafe.

For now it only print a warning if the uniform was not queried before.

2 years agoGP: Make Close fill strokes visible
Antonioya [Thu, 17 Jan 2019 18:33:39 +0000 (19:33 +0100)]
GP: Make Close fill strokes visible

2 years agoFix T60558: Cycles viewport render mismatch when the camera is a light.
Brecht Van Lommel [Thu, 17 Jan 2019 15:28:43 +0000 (16:28 +0100)]
Fix T60558: Cycles viewport render mismatch when the camera is a light.

2 years agoPreferences: fit a little better when opened in place of properties editor.
Brecht Van Lommel [Thu, 17 Jan 2019 13:31:18 +0000 (14:31 +0100)]
Preferences: fit a little better when opened in place of properties editor.

2 years agoFix wrong placement of allow negative frames preference.
Brecht Van Lommel [Thu, 17 Jan 2019 11:41:38 +0000 (12:41 +0100)]
Fix wrong placement of allow negative frames preference.

2 years agoFix T60580: depsgraph object instance 'matrix_world' always returns identity matrix.
Bastien Montagne [Thu, 17 Jan 2019 11:28:50 +0000 (12:28 +0100)]
Fix T60580: depsgraph object instance 'matrix_world' always returns identity matrix.

While form a strict consistency point of view it could make sense to
return identity matrix for non-instance items, it can be very handy to
get that info (common to both instances and regular objects) directly in
all cases.

2 years agoAdd experimental batch-delete of hierarchy to Outliner.
Bastien Montagne [Thu, 17 Jan 2019 11:09:07 +0000 (12:09 +0100)]
Add experimental batch-delete of hierarchy to Outliner.

This uses the same command as regular hierarchy delete, and is only
activated when debug value is set to 666 for now.

Here on file from T60419, it gives about 20% speed-up (from 5.5s to 4.4s).

2 years agoRNA Depsgraĥ: add a warning about not using object_instances as a sequence.
Bastien Montagne [Thu, 17 Jan 2019 10:56:56 +0000 (11:56 +0100)]
RNA Depsgraĥ: add a warning about not using object_instances as a sequence.

Due to how this is generated, each item is freed when steping iteration
to the next one, which means that subscriptions etc. will make blender