blender.git
20 months agoMerge remote-tracking branch 'origin' into blender2.8
Gaia Clary [Sun, 11 Mar 2018 22:45:53 +0000 (23:45 +0100)]
Merge remote-tracking branch 'origin' into blender2.8

20 months agofix Collada: wrong usage of pointer and hidden redeclaration
Gaia Clary [Sun, 11 Mar 2018 19:32:47 +0000 (20:32 +0100)]
fix Collada: wrong usage of pointer and hidden redeclaration

* Suspicious usage of pointer:

  short *type = 0; // this creates a null pointer

When this is later used for anything then blender would crash.
After following the code and check what happens i strongly believe
the author wanted to use a short and not a pointer to a short here.

* local variable where reused later in same function
While this did no harm, i still felt it was better to use a different
name here to make things more separated:

- moved variable declaraiotns into loop (for int a=0; ...)
- renamed uv_images to uv_image_set
- renamed index variable from i to j in inner loop that
  reused same index name from outer loop

20 months agoCleanup Collada: Removed duplicate variable setting
Gaia Clary [Sun, 11 Mar 2018 19:15:44 +0000 (20:15 +0100)]
Cleanup Collada: Removed duplicate variable setting

20 months agoCleanup: avoid redeclaration of iterator in same function
Gaia Clary [Sun, 11 Mar 2018 19:12:55 +0000 (20:12 +0100)]
Cleanup: avoid redeclaration of iterator in same function

The iterator was redeclared 3 times. I fixed this to avoid future issues.
I commit separately because so the changes are less cluttered all over
the place.

20 months agoCleanup Collada: Avoid unintentional reuse of previous defined variable
Gaia Clary [Sun, 11 Mar 2018 19:09:26 +0000 (20:09 +0100)]
Cleanup Collada: Avoid unintentional reuse of previous defined variable

The variable child was redeclared multiple times in the same function.
While this has not created any issues i still changed this to avoid
confusion and keep the usage of the variables more local.

20 months agoFix Collada: Avoid unnecessary and even wrong check on unavailable data
Gaia Clary [Sun, 11 Mar 2018 19:00:46 +0000 (20:00 +0100)]
Fix Collada: Avoid unnecessary and even wrong check on unavailable data

The function validateConstraints() potentially causes a null pointer
exception. I changed this so that the function returns a failure as soon
as the validation fails. This avoids falling into the null pointer trap.

20 months agoCleanup Collada: Make sure index variables are not reused
Gaia Clary [Sun, 11 Mar 2018 18:57:40 +0000 (19:57 +0100)]
Cleanup Collada: Make sure index variables are not reused

The variables i and j have been declared before in the same function.
I changed the names to mi and mj to keep things clear.

20 months agoCleanup Collada: make sure float array is initialised
Gaia Clary [Sun, 11 Mar 2018 18:51:16 +0000 (19:51 +0100)]
Cleanup Collada: make sure float array is initialised

This is just to silence a compiler warning and keeping
the code clean. The actual code never uses uninitialised
array elements.

20 months agoRefactor Collada: combined 2 almost identical functions into one
Gaia Clary [Sun, 11 Mar 2018 11:44:02 +0000 (12:44 +0100)]
Refactor Collada: combined 2 almost identical functions into one

The 2 methods add_bezt() and create_bezt() do almost the same.
I combined them both into add_bezt() and added the optional parameter
eBezTriple_Interpolation ipo

20 months agoFix T54274, and rename option --window-borderless to --window-fullscreen
Arto Kitula [Sun, 11 Mar 2018 10:26:43 +0000 (12:26 +0200)]
Fix T54274, and rename option --window-borderless to --window-fullscreen

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 11 Mar 2018 05:08:12 +0000 (16:08 +1100)]
Merge branch 'master' into blender2.8

20 months agoCleanup: long lines
Campbell Barton [Sun, 11 Mar 2018 04:50:07 +0000 (15:50 +1100)]
Cleanup: long lines

20 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sat, 10 Mar 2018 18:01:01 +0000 (19:01 +0100)]
Merge branch 'master' into blender2.8

20 months agoCycles: add roughness baking support, using squared roughness convention.
Brecht Van Lommel [Sat, 10 Mar 2018 17:18:05 +0000 (18:18 +0100)]
Cycles: add roughness baking support, using squared roughness convention.

20 months agoCycles: switch to squared roughness convention for all nodes.
Brecht Van Lommel [Sat, 10 Mar 2018 15:09:22 +0000 (16:09 +0100)]
Cycles: switch to squared roughness convention for all nodes.

This was already done for the Principled BSDF to be compatible with typical
baked roughness maps in PBR workflows.

20 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sat, 10 Mar 2018 05:55:39 +0000 (06:55 +0100)]
Merge branch 'master' into blender2.8

20 months agoCode cleanup: fix compiler warning.
Brecht Van Lommel [Sat, 10 Mar 2018 05:51:52 +0000 (06:51 +0100)]
Code cleanup: fix compiler warning.

20 months agoFix T54279: viewport update bug with volume meshes.
Brecht Van Lommel [Sat, 10 Mar 2018 05:10:14 +0000 (06:10 +0100)]
Fix T54279: viewport update bug with volume meshes.

Meshes without vertex normals were not handled correctly.

20 months agoCode refactor: reduce number of loops over meshes.
Brecht Van Lommel [Sat, 10 Mar 2018 04:45:49 +0000 (05:45 +0100)]
Code refactor: reduce number of loops over meshes.

20 months agoFix T54278: volume artifacts with small density and color after recent changes.
Brecht Van Lommel [Sat, 10 Mar 2018 04:03:03 +0000 (05:03 +0100)]
Fix T54278: volume artifacts with small density and color after recent changes.

20 months agoFix T54269: saved EXR file files unreadable some editors in Blender.
Brecht Van Lommel [Sat, 10 Mar 2018 03:33:14 +0000 (04:33 +0100)]
Fix T54269: saved EXR file files unreadable some editors in Blender.

Don't write the multichannel metadata when there is only a single layer,
and don't unnecessarily consider single layer images with Blender metadata
as multi layer.

20 months agoCode cleanup: use spaces for aligned indentation.
Brecht Van Lommel [Sat, 10 Mar 2018 02:57:18 +0000 (03:57 +0100)]
Code cleanup: use spaces for aligned indentation.

20 months agoCycles: support arbitrary number of motion blur steps for objects.
Brecht Van Lommel [Thu, 8 Mar 2018 03:04:52 +0000 (04:04 +0100)]
Cycles: support arbitrary number of motion blur steps for objects.

20 months agoCycles: support arbitrary number of motion blur steps for cameras.
Brecht Van Lommel [Sat, 10 Mar 2018 00:36:09 +0000 (01:36 +0100)]
Cycles: support arbitrary number of motion blur steps for cameras.

20 months agoCode refactor: motion blur cleanups, preparing for next commit.
Brecht Van Lommel [Fri, 9 Mar 2018 23:37:07 +0000 (00:37 +0100)]
Code refactor: motion blur cleanups, preparing for next commit.

20 months agoCode refactor: don't expose UpdateObjectTransformState in header.
Brecht Van Lommel [Sat, 10 Mar 2018 00:15:02 +0000 (01:15 +0100)]
Code refactor: don't expose UpdateObjectTransformState in header.

20 months agoCode refactor: make Transform always affine, dropping last row.
Brecht Van Lommel [Thu, 8 Mar 2018 05:48:14 +0000 (06:48 +0100)]
Code refactor: make Transform always affine, dropping last row.

This save a little memory and copying in the kernel by storing only a 4x3
matrix instead of a 4x4 matrix. We already did this in a few places, and
those don't need to be special exceptions anymore now.

20 months agoCode refactor: add DecomposedTransform.
Brecht Van Lommel [Thu, 8 Mar 2018 05:19:17 +0000 (06:19 +0100)]
Code refactor: add DecomposedTransform.

This is in preparation of making Transform affine only, and also gives us
a little extra type safety so we don't accidentally treat it as a regular
4x4 matrix.

20 months agoCode refactor: add ProjectionTransform separate from regular Transform.
Brecht Van Lommel [Thu, 8 Mar 2018 04:33:55 +0000 (05:33 +0100)]
Code refactor: add ProjectionTransform separate from regular Transform.

This is in preparation of making Transform affine only.

20 months agoCode refactor: avoid motion transform copy, remove unused curved code.
Brecht Van Lommel [Wed, 7 Mar 2018 22:52:26 +0000 (23:52 +0100)]
Code refactor: avoid motion transform copy, remove unused curved code.

The purpose of the previous code refactoring is to make the code more readable,
but combined with this change benchmarks also render about 2-3% faster with an
NVIDIA Titan Xp.

20 months agoCode refactor: use KernelShader and KernelParticle instead of float arrays.
Stefan Werner [Wed, 7 Mar 2018 23:35:24 +0000 (00:35 +0100)]
Code refactor: use KernelShader and KernelParticle instead of float arrays.

Original patch by Stefan with modifications by Brecht.

20 months agoCode refactor: use KernelLight instead of float4 arrays.
Stefan Werner [Wed, 7 Mar 2018 23:15:41 +0000 (00:15 +0100)]
Code refactor: use KernelLight instead of float4 arrays.

Original patch by Stefan with modifications by Brecht.

20 months agoCode refactor: use KernelOject struct instead of float4 array.
Stefan Werner [Wed, 7 Mar 2018 21:19:56 +0000 (22:19 +0100)]
Code refactor: use KernelOject struct instead of float4 array.

Original patch by Stefan with modifications by Brecht.

20 months agoEevee: Planar Reflections: Fix corrupted results in downsampling step.
Clément Foucault [Sat, 10 Mar 2018 01:18:12 +0000 (02:18 +0100)]
Eevee: Planar Reflections: Fix corrupted results in downsampling step.

It only seems to happen in some drivers/gpu, the vertices gets culled if 4th component is 0.0. So lesson learned: always use 1.0 if constant.

20 months agoEevee: Planar Reflection: Add refraction support for reflected objects.
Clément Foucault [Fri, 9 Mar 2018 23:03:25 +0000 (00:03 +0100)]
Eevee: Planar Reflection: Add refraction support for reflected objects.

20 months agoEevee: Add new clipping UBO.
Clément Foucault [Fri, 9 Mar 2018 23:02:01 +0000 (00:02 +0100)]
Eevee: Add new clipping UBO.

This fixes problems with the planar reflections.

20 months agoEevee: Make use of the new view matrix UBO.
Clément Foucault [Fri, 9 Mar 2018 23:00:04 +0000 (00:00 +0100)]
Eevee: Make use of the new view matrix UBO.

20 months agoDRW: Change UBOs binding logic.
Clément Foucault [Fri, 9 Mar 2018 22:50:30 +0000 (23:50 +0100)]
DRW: Change UBOs binding logic.

Use the same logic than textures. Also reset bindings only on shader changes.

20 months agoDRW: Change clip planes API.
Clément Foucault [Fri, 9 Mar 2018 22:49:08 +0000 (23:49 +0100)]
DRW: Change clip planes API.

The draw manager now just set the number of active clip planes. It's now up to the engine to specify the plane equations as uniform/ubo/constant.

20 months agoDRW: Add assert for uniform that needs valid data.
Clément Foucault [Fri, 9 Mar 2018 18:54:27 +0000 (19:54 +0100)]
DRW: Add assert for uniform that needs valid data.

20 months agoDRW: Put all view-only dependant uniform in a UBO.
Clément Foucault [Fri, 9 Mar 2018 18:52:37 +0000 (19:52 +0100)]
DRW: Put all view-only dependant uniform in a UBO.

This leads to less lookups to the GWNShaderInterface and less uniform upload.

We still keep a legacy path so that Builtin uniforms can still work. We might restrict this path to Builtin shader only in the future.

20 months agoEevee: Probes: Fix last planar reflections remaining after deletion.
Clément Foucault [Thu, 8 Mar 2018 17:02:42 +0000 (18:02 +0100)]
Eevee: Probes: Fix last planar reflections remaining after deletion.

20 months agoEevee: Probes: Add culling for planar probes.
Clément Foucault [Thu, 8 Mar 2018 16:56:30 +0000 (17:56 +0100)]
Eevee: Probes: Add culling for planar probes.

Planar probes that have no influence on pixels in the view are culled.

This greatly improve performance when theses probes are offscreen.

20 months agoDRW: Culling: Expose & Add culling functions to engines.
Clément Foucault [Thu, 8 Mar 2018 16:54:14 +0000 (17:54 +0100)]
DRW: Culling: Expose & Add culling functions to engines.

This way engines can do preemptive culling by themselves.

20 months agoBoundBox: Fix wrong max in BKE_boundbox_alloc_unit.
Clément Foucault [Thu, 8 Mar 2018 16:51:24 +0000 (17:51 +0100)]
BoundBox: Fix wrong max in BKE_boundbox_alloc_unit.

20 months agoEevee: Render: Add cancel support
Clément Foucault [Thu, 8 Mar 2018 14:22:57 +0000 (15:22 +0100)]
Eevee: Render: Add cancel support

You can now cancel your renders that are too long. This will still output the current status of the render. For example if you cancel at 50% rendering progress, you will have a render result with only half the render samples.

20 months agoDRW: Culling: Fix precision error.
Clément Foucault [Thu, 8 Mar 2018 14:06:50 +0000 (15:06 +0100)]
DRW: Culling: Fix precision error.

This was triggering the BLI_assert(fac >= 0.0f);.

Clamp fac to ensure correct value for release builds.

20 months agoEevee: Planar: Add transparent objects.
Clément Foucault [Thu, 8 Mar 2018 00:36:49 +0000 (01:36 +0100)]
Eevee: Planar: Add transparent objects.

The ordering is left broken for the viewport as this can be quite heavy.
Only do it if doing a render.

20 months agoEevee: Planar Probe: Add supersampling jitter.
Clément Foucault [Thu, 8 Mar 2018 00:35:16 +0000 (01:35 +0100)]
Eevee: Planar Probe: Add supersampling jitter.

This also fix a bug with the probe debug display when there was more than 2 probes. ped->probe_id was equal to 0 for all planar probes until the next frame. Resulting in all planar data debug to show probe 0.

20 months agoDon't add "Report a Bug" button for official tracker to non-official add-ons
Julian Eisel [Fri, 9 Mar 2018 20:17:43 +0000 (21:17 +0100)]
Don't add "Report a Bug" button for official tracker to non-official add-ons

If no custom URL was set, add-ons would get a "Report a Bug" button opening
the default developer.blender.org bug tracker. Now we only add this default
button if the add-on is bundled and not installed by the user.

20 months agoFix Pose Lib: pose is applied when selected bones don't overlap with pose
Sybren A. Stüvel [Fri, 9 Mar 2018 18:03:29 +0000 (19:03 +0100)]
Fix Pose Lib: pose is applied when selected bones don't overlap with pose

Premise: When pose bones are selected, applying a pose library should
only affect the selected bones.

This commit fixes a bug where the pose was also applied when there was
no overlap between the selected bones and the bones in the pose. For
example, applying a pose which contains only keyframes for the left
hand, while only right-hand bones are selected, would apply the pose
to the left hand anyway.

The code is now also slightly more efficient; the removed 'selcount'
counter was only used as a binary (i.e. zero or non-zero). It's now
stored as a bitflag instead.

20 months agoCleanup: iterator macros
Antonio Vazquez [Fri, 9 Mar 2018 10:00:54 +0000 (11:00 +0100)]
Cleanup: iterator macros

This line was missing in previous commit

20 months agoManipulator: disable UV widget, following prefs
Campbell Barton [Fri, 9 Mar 2018 09:44:41 +0000 (20:44 +1100)]
Manipulator: disable UV widget, following prefs

20 months agoFFmpeg: Add regression tests
Sergey Sharybin [Mon, 5 Mar 2018 14:32:49 +0000 (15:32 +0100)]
FFmpeg: Add regression tests

Currently only covering handful of files from reports about wrong fps detected.

It will need D3083 applied first to get tests passed, also tests themselves
are to be committed to svn.

But there are some python code which needs to be reviewed, like blendfile
passed to run_blender().

Reviewers: sybren, mont29

Reviewed By: sybren, mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D3096

20 months agoFix T53857: Incorrect framerate for videos imported from OBS
Sergey Sharybin [Mon, 26 Feb 2018 15:39:18 +0000 (16:39 +0100)]
Fix T53857: Incorrect framerate for videos imported from OBS

This is an issue with which value to trust: fps vs. tbr. They both cam be
somewhat broken. Currently the idea is:

- If file was saved with FFmpeg AND we are decoding with FFmpeg we trust tbr.
- If we are decoding with Libav we use fps (there does not seem to be tbr in
  Libav, unless i'm missing something).
- All other cases we use fps.

Seems to work all good for files from T53857, T54148 and T51153. Ideally we
would need to collect some amount of regression files to make further tweaks
more scientific.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D3083

20 months agoCleanup: iterator macros
Campbell Barton [Fri, 9 Mar 2018 00:44:42 +0000 (11:44 +1100)]
Cleanup: iterator macros

- put render iterator in own scope
  (would shadow it's own variable if used multiple times).
- enforce semicolon at end of iterator macros.
- no need to typedef one-off macro structs.

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 8 Mar 2018 06:52:10 +0000 (17:52 +1100)]
Merge branch 'master' into blender2.8

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 8 Mar 2018 06:42:06 +0000 (17:42 +1100)]
Merge branch 'master' into blender2.8

20 months agoCleanup: Rename view3d context set function
Campbell Barton [Thu, 8 Mar 2018 06:30:24 +0000 (17:30 +1100)]
Cleanup: Rename view3d context set function

Use common prefix so adding related functions share the prefix.

20 months agoCleanup: use edit/active objects from view context
Campbell Barton [Thu, 8 Mar 2018 06:26:02 +0000 (17:26 +1100)]
Cleanup: use edit/active objects from view context

Needed to implement multiple edit-objects.

20 months agoCleanup: set the view-context once
Campbell Barton [Thu, 8 Mar 2018 06:21:39 +0000 (17:21 +1100)]
Cleanup: set the view-context once

20 months agoCleanup: Use BKE_ prefix for all public functions exposed by the NLA module
Joshua Leung [Thu, 8 Mar 2018 04:14:46 +0000 (17:14 +1300)]
Cleanup: Use BKE_ prefix for all public functions exposed by the NLA module

20 months agoT54233: NLA "Push Down" discards Blend Mode, Extrapolation, and Influence
Joshua Leung [Thu, 8 Mar 2018 03:49:33 +0000 (16:49 +1300)]
T54233: NLA "Push Down" discards Blend Mode, Extrapolation, and Influence

Each AnimData block has a set of Blend/Extrapolation/Influence settings
that can be used to control how the active action is blended with the
NLA stack. However, these settings were not getting copied over to the
newly created strips (as the push-down code existed long before these
settings were added).

This commit solves this in several ways:
* Active Action Blend/Extrapolation/Influence settings now get copied
  to the new strips when adding them to the NLA stack via Push Down.

  Note: This doesn't happen when there are no existing NLA tracks,
        as these settings don't get used in that case.

* Strip Influence will be copied across when inf < 1.0 (i.e. when a
  non-default value is used), to maintain the effect. To make this work,
  the influence value will get added as a keyframe to the strip's
  "Influence" Control FCurve.

  - See code comments for an alternative approach and why that was not chosen
  - Strip Time still doesn't get keyframes added automatically yet.

* To ensure the "extrapolation mode" settings don't get always overwritten,
  I've put in place a compromise: the extrapolation will only get changed
  if the chosen setting will cause problmes (i.e. hold forward & back -> hold forward
  if there are other tracks before it already).

Not safe for backporting to 2.79[x] stable releases.

20 months agoFix crash if NLA strip with "Use Animated Influence" setting is enabled without the...
Joshua Leung [Thu, 8 Mar 2018 02:17:53 +0000 (15:17 +1300)]
Fix crash if NLA strip with "Use Animated Influence" setting is enabled without the Influence Strip F-Curve existing

20 months agoCleanup: Fix invalid name prefix
Joshua Leung [Mon, 5 Mar 2018 02:58:07 +0000 (15:58 +1300)]
Cleanup: Fix invalid name prefix

20 months agoEevee: Render: Add progress.
Clément Foucault [Wed, 7 Mar 2018 23:08:56 +0000 (00:08 +0100)]
Eevee: Render: Add progress.

20 months agoEevee: Save and reset matrixstate for probe rendering.
Clément Foucault [Wed, 7 Mar 2018 22:25:49 +0000 (23:25 +0100)]
Eevee: Save and reset matrixstate for probe rendering.

20 months agoDRW: Fix culling with inverted view (planar reflections)
Clément Foucault [Wed, 7 Mar 2018 18:03:01 +0000 (19:03 +0100)]
DRW: Fix culling with inverted view (planar reflections)

Just invert the frustum planes in this case.

20 months agoMake sure that the WM_opengl_context_create is always called on the main thread
Germano [Wed, 7 Mar 2018 23:05:51 +0000 (20:05 -0300)]
Make sure that the WM_opengl_context_create is always called on the main thread

Avoid the error 170 ("The requested resource is in use").

20 months agoFix wglShareLists being called with rendering contexts in use
Germano [Wed, 7 Mar 2018 22:40:08 +0000 (19:40 -0300)]
Fix wglShareLists being called with rendering contexts in use

`wglShareLists` was failing with error code 170 ("The requested resource is in use").

20 months agoFix T54206: bevel and inset operations repeat did not remember offset.
Brecht Van Lommel [Wed, 7 Mar 2018 21:19:56 +0000 (22:19 +0100)]
Fix T54206: bevel and inset operations repeat did not remember offset.

Now repeating the operator will use the previously chosen offset, either with
the modal operator or typed in. The modal operator will still start at zero.

20 months agoProper fix for User Preferences window crash
Julian Eisel [Wed, 7 Mar 2018 20:18:16 +0000 (21:18 +0100)]
Proper fix for User Preferences window crash

Reverts rBb9ae517794765d6a1660 and fixes the issue properly. Old fix could cause
NULL to be passed to functions that expect all arguments to be non-NULL.

20 months agoFix Blenderplayer not compiling
Julian Eisel [Wed, 7 Mar 2018 19:41:49 +0000 (20:41 +0100)]
Fix Blenderplayer not compiling

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Mar 2018 15:03:36 +0000 (02:03 +1100)]
Merge branch 'master' into blender2.8

20 months agoEditMesh: pass object data to notifiers
Campbell Barton [Wed, 7 Mar 2018 14:47:35 +0000 (01:47 +1100)]
EditMesh: pass object data to notifiers

Both were being passed in different parts of the code,
use object data for consistency.

20 months agoCleanup: use _BEGIN suffix for group iterators
Campbell Barton [Wed, 7 Mar 2018 09:46:27 +0000 (20:46 +1100)]
Cleanup: use _BEGIN suffix for group iterators

20 months agoAdd missing NULL check
Campbell Barton [Wed, 7 Mar 2018 05:40:02 +0000 (16:40 +1100)]
Add missing NULL check

Caused loading user-prefs to crash.

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Mar 2018 03:31:53 +0000 (14:31 +1100)]
Merge branch 'master' into blender2.8

20 months agoCleanup: edit-mode undo API
Campbell Barton [Wed, 7 Mar 2018 02:55:36 +0000 (13:55 +1100)]
Cleanup: edit-mode undo API

Move function descriptions into the struct,
minor improvements to variable naming,
use convention of 'g_' prefix for static vars.

20 months agoDRW: Fix memory leak.
Clément Foucault [Wed, 7 Mar 2018 00:39:09 +0000 (01:39 +0100)]
DRW: Fix memory leak.

This prevents the creation of a new job if no job is running.

20 months agoEevee: Fix volume rendering glitches.
Clément Foucault [Wed, 7 Mar 2018 00:36:09 +0000 (01:36 +0100)]
Eevee: Fix volume rendering glitches.

The bug was due to the Halton function returning uninitialized value for 0 iteration.

20 months agoEevee: Fix garbage on the first frames when enabling volumetrics.
Clément Foucault [Tue, 6 Mar 2018 22:17:50 +0000 (23:17 +0100)]
Eevee: Fix garbage on the first frames when enabling volumetrics.

Was cause by newly added shader deferred compilation.

20 months agoDraw Manager: Simplify the algorithm that extract the BoundingSphere of a Frustum
Germano [Tue, 6 Mar 2018 22:27:43 +0000 (19:27 -0300)]
Draw Manager: Simplify the algorithm that extract the BoundingSphere of a Frustum

The idea is to separate the most common case from symmetrical frustum. And to make a simple but efficient calculation.

The new radius is usually 98% the size of the radius size of the asymmetric solution.

Thanks to @fclem for reviewing the patch on IRC

20 months agoEevee: Fix crash with volumetrics + default mat + alpha blend
Clément Foucault [Tue, 6 Mar 2018 15:52:06 +0000 (16:52 +0100)]
Eevee: Fix crash with volumetrics + default mat + alpha blend

20 months agoEevee: Fix Cascaded shadowmap setup.
Clément Foucault [Tue, 6 Mar 2018 01:51:51 +0000 (02:51 +0100)]
Eevee: Fix Cascaded shadowmap setup.

It was getting the wrong matrice because of the point light override.

20 months agoDRW: Fix DRW_viewport_matrix_override_set_all function.
Clément Foucault [Tue, 6 Mar 2018 01:49:55 +0000 (02:49 +0100)]
DRW: Fix DRW_viewport_matrix_override_set_all function.

20 months agoEevee: Fix probes not working after a world update.
Clément Foucault [Tue, 6 Mar 2018 01:36:00 +0000 (02:36 +0100)]
Eevee: Fix probes not working after a world update.

20 months agoEevee: Update to support shader deferred compilation.
Clément Foucault [Tue, 6 Mar 2018 01:19:28 +0000 (02:19 +0100)]
Eevee: Update to support shader deferred compilation.

World probe is tagged to refresh when it it's shader is updated.
Probes are recomputed only after all meshes shaders have been compiled.

20 months agoGPU: Fix typo.
Clément Foucault [Mon, 5 Mar 2018 20:52:02 +0000 (21:52 +0100)]
GPU: Fix typo.

20 months agoDRW: Fix broken grid in ortho view.
Clément Foucault [Mon, 5 Mar 2018 15:11:49 +0000 (16:11 +0100)]
DRW: Fix broken grid in ortho view.

20 months agoEevee: fix wrong sizeof.
Clément Foucault [Mon, 5 Mar 2018 00:26:12 +0000 (01:26 +0100)]
Eevee: fix wrong sizeof.

Like really? wtf dude? *self face slapping*

20 months agoDRW: Shader Deferred compilation: Use a wmJob for threading.
Clément Foucault [Mon, 5 Mar 2018 20:50:56 +0000 (21:50 +0100)]
DRW: Shader Deferred compilation: Use a wmJob for threading.

Also get rid of the static var and initialization.
This enables the user to see the progress on the info header.
Closing blender or reading a file also kill the job which is good.

Unfortunatly, this job cannot be interrupt by users directly. We could make it interruptible but we need a way to resume the compilation.

20 months agoDRW: Deferred compilation initial implementation.
Clément Foucault [Sun, 4 Mar 2018 23:54:31 +0000 (00:54 +0100)]
DRW: Deferred compilation initial implementation.

20 months agoMaterial: Free gpumaterials before the notree.
Clément Foucault [Sun, 4 Mar 2018 23:52:19 +0000 (00:52 +0100)]
Material: Free gpumaterials before the notree.

This is because gpumaterials can contain references to the tree when doing lazy compilation.

20 months agoEevee: Fix bad framebuffer when changing probe resolution.
Clément Foucault [Sun, 4 Mar 2018 23:49:24 +0000 (00:49 +0100)]
Eevee: Fix bad framebuffer when changing probe resolution.

20 months agoScreen: Fix screen layout preview render.
Clément Foucault [Sat, 3 Mar 2018 17:06:19 +0000 (18:06 +0100)]
Screen: Fix screen layout preview render.

20 months agoEevee: More use of DRW_viewport_matrix_override_set_all
Clément Foucault [Sat, 3 Mar 2018 00:48:16 +0000 (01:48 +0100)]
Eevee: More use of DRW_viewport_matrix_override_set_all

20 months agoDRW: Fix occlusion culling.
Clément Foucault [Tue, 6 Mar 2018 15:26:13 +0000 (16:26 +0100)]
DRW: Fix occlusion culling.

20 months agoCycles: Fix crash when building with no shading systems
Sergey Sharybin [Tue, 6 Mar 2018 11:00:51 +0000 (12:00 +0100)]
Cycles: Fix crash when building with no shading systems

20 months agoCycles: Cleanup, indentation
Sergey Sharybin [Tue, 6 Mar 2018 10:42:30 +0000 (11:42 +0100)]
Cycles: Cleanup, indentation