4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 23 Aug 2017 09:21:52 +0000 (19:21 +1000)]
Merge branch 'master' into blender2.8

4 years agoRNA: use string-join to simplify operator register
Campbell Barton [Wed, 23 Aug 2017 08:17:42 +0000 (18:17 +1000)]
RNA: use string-join to simplify operator register

Also sanity check macro-operator ID's.

4 years agoBLI_string_utils: string joining utility functions
Campbell Barton [Wed, 23 Aug 2017 08:16:46 +0000 (18:16 +1000)]
BLI_string_utils: string joining utility functions

Includes a version that takes a separator and macros for convenience.

4 years agoPyAPI: avoid instantiating args twice in macro
Campbell Barton [Wed, 23 Aug 2017 08:44:58 +0000 (18:44 +1000)]
PyAPI: avoid instantiating args twice in macro

Would cause problems if args included function calls.

4 years agoRNA: check for duplicate manipulator names
Campbell Barton [Wed, 23 Aug 2017 06:22:48 +0000 (16:22 +1000)]
RNA: check for duplicate manipulator names

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 23 Aug 2017 06:10:45 +0000 (16:10 +1000)]
Merge branch 'master' into blender2.8

4 years agoCleanup: remove space from filenames
Campbell Barton [Wed, 23 Aug 2017 05:50:44 +0000 (15:50 +1000)]
Cleanup: remove space from filenames

4 years agoTests: fix incorrect check for hidden dir
Campbell Barton [Wed, 23 Aug 2017 05:36:39 +0000 (15:36 +1000)]
Tests: fix incorrect check for hidden dir

Copy-pasted mistake in tests and tools.

4 years agoRNA: report error on struct naming collision
Campbell Barton [Wed, 23 Aug 2017 04:59:14 +0000 (14:59 +1000)]
RNA: report error on struct naming collision

Fixes T52463, error instead of crash.

4 years agoRNA: keep structs_map valid w/ ID duplicate & free
Campbell Barton [Wed, 23 Aug 2017 04:14:55 +0000 (14:14 +1000)]
RNA: keep structs_map valid w/ ID duplicate & free

4 years agoGHash: BLI_ghash_reinsert_key utility function
Campbell Barton [Wed, 23 Aug 2017 02:43:05 +0000 (12:43 +1000)]
GHash: BLI_ghash_reinsert_key utility function

Useful when ghash keys are reallocated.

4 years agoFix T52466: Silence search for button_context menu type.
Thomas Beck [Tue, 22 Aug 2017 19:33:58 +0000 (21:33 +0200)]
Fix T52466: Silence search for button_context menu type.

We were showing "search for unknown menutype WM_MT_button_context" messages in terminal which were not helpful for users, so now they are disabled.

To be backported to 2.79

4 years agoFix error in PointerProperty argument list
Campbell Barton [Tue, 22 Aug 2017 16:14:33 +0000 (02:14 +1000)]
Fix error in PointerProperty argument list

Regression in a7b3047

4 years agoFix T52483: Fill is incorrect for interpolated strokes
Antonio Vazquez [Tue, 22 Aug 2017 15:42:53 +0000 (17:42 +0200)]
Fix T52483: Fill is incorrect for interpolated strokes

The recalc flag must be enabled for new interpolated strokes.

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 22 Aug 2017 14:31:33 +0000 (16:31 +0200)]
Merge branch 'master' into blender2.8

4 years agoFix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out...
Sergey Sharybin [Tue, 22 Aug 2017 14:27:33 +0000 (16:27 +0200)]
Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent

4 years agoDepsgraph: Cleanup, make code friendlier to be edited in columns
Sergey Sharybin [Tue, 22 Aug 2017 14:24:58 +0000 (16:24 +0200)]
Depsgraph: Cleanup, make code friendlier to be edited in columns

4 years agoDepsgraph: Remove placeholder for path evaluation
Sergey Sharybin [Tue, 22 Aug 2017 14:10:52 +0000 (16:10 +0200)]
Depsgraph: Remove placeholder for path evaluation

Wasn't used in years, if it really needs to be dedicated operation it needs to
be revisited anyway.

4 years agoFix threading conflict when doing Cycles background render
Sergey Sharybin [Tue, 22 Aug 2017 13:50:05 +0000 (15:50 +0200)]
Fix threading conflict when doing Cycles background render

It is possible to have same image used multiple times at different frames,
which means we can not free it's buffers without any guard. From quick tests
this seems to be doing what it is supposed to.

Need more testing and port this to 2.79.

4 years agoGPUTexture: Remove Warning.
Clément Foucault [Tue, 22 Aug 2017 12:41:19 +0000 (14:41 +0200)]
GPUTexture: Remove Warning.

4 years agoGL_TEXTURE_2D_ARRAY wasn't handled in GPU_texture_update
Dalai Felinto [Tue, 22 Aug 2017 12:33:57 +0000 (14:33 +0200)]
GL_TEXTURE_2D_ARRAY wasn't handled in GPU_texture_update

Although the problem was exposed in 9457715d9a6f, the problem was in the
original code that was copied over. To have:

} else { /* EXPECTED_VALUE */

Without an BLI_assert(value == EXPECTED_VALUE); is asking for troubles.
Yet another reason to favour switch statements with:

    BLI_assert(!"value not implemented or supported");

Instead of chained if/else if/else /* expected_value */.

4 years agoadd GPU_glew header
Campbell Barton [Tue, 22 Aug 2017 12:22:21 +0000 (22:22 +1000)]
add GPU_glew header

4 years agoFix T52053: Sculpt missing update w/ clay engine
Campbell Barton [Tue, 22 Aug 2017 12:07:38 +0000 (22:07 +1000)]
Fix T52053: Sculpt missing update w/ clay engine

Leaving sculpt mode wasn't updating the mesh because the update
flushed from the depsgraph ignored edits to vertex location.

4 years agoCleanup: naming for mesh dirty flags
Campbell Barton [Tue, 22 Aug 2017 12:04:40 +0000 (22:04 +1000)]
Cleanup: naming for mesh dirty flags


Where 'MAYBE_ALL' checks to see if the mesh has changed.
This is clearer that `BKE_MESH_BATCH_DIRTY_ALL` is dirty and
going to be updated without any guess-work.

4 years agoFix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Sergey Sharybin [Tue, 22 Aug 2017 10:52:28 +0000 (12:52 +0200)]
Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer

Most likely needs in 2.79 final release.

4 years agoGPU Texture: Use switch instead of if/else
Dalai Felinto [Tue, 22 Aug 2017 10:30:03 +0000 (12:30 +0200)]
GPU Texture: Use switch instead of if/else

4 years agoManipulator: template for Python manipulator
Campbell Barton [Tue, 22 Aug 2017 10:10:53 +0000 (20:10 +1000)]
Manipulator: template for Python manipulator

This is an example of a manipulator that defines it's own geometry.

4 years agoManipulator: Add API target_get/set/range wrappers
Campbell Barton [Tue, 22 Aug 2017 08:55:19 +0000 (18:55 +1000)]
Manipulator: Add API target_get/set/range wrappers

Allows Python manipulators access the values of target properties
needed for Python to make use of the general target property interface.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 22 Aug 2017 08:18:38 +0000 (18:18 +1000)]
Merge branch 'master' into blender2.8

4 years agoPyAPI: Minor gawain corrections
Campbell Barton [Tue, 22 Aug 2017 04:53:20 +0000 (14:53 +1000)]
PyAPI: Minor gawain corrections

4 years agoEevee: Fix T52486
Clément Foucault [Tue, 22 Aug 2017 08:22:11 +0000 (10:22 +0200)]
Eevee: Fix T52486

For that introduce an update function for textures.

4 years agoPyAPI: replace PyC_FromArray with typed functions
Campbell Barton [Tue, 22 Aug 2017 08:02:58 +0000 (18:02 +1000)]
PyAPI: replace PyC_FromArray with typed functions

This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.

Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.

4 years agoFix panorama render crash with split kernel, due to incorrect buffer pointer.
Brecht Van Lommel [Mon, 21 Aug 2017 20:50:24 +0000 (22:50 +0200)]
Fix panorama render crash with split kernel, due to incorrect buffer pointer.

Also some refactoring to clarify variable usage scope.

4 years agoCycles: reorganize Performance panel layout, move viewport BVH type to debug.
Brecht Van Lommel [Mon, 21 Aug 2017 13:09:03 +0000 (15:09 +0200)]
Cycles: reorganize Performance panel layout, move viewport BVH type to debug.

4 years agoFix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet.
Brecht Van Lommel [Mon, 21 Aug 2017 17:03:32 +0000 (19:03 +0200)]
Fix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet.

4 years agoCleanup: rename manipulator API functions
Campbell Barton [Mon, 21 Aug 2017 16:06:46 +0000 (02:06 +1000)]
Cleanup: rename manipulator API functions

- WM_manipulatorgrouptype_remove- > free
- WM_manipulator_group -> WM_manipulator_group_type

Naming here is still a bit confusing,
now at least free/remove are differentiated.

4 years agoFix crash re-registering manipulators
Campbell Barton [Mon, 21 Aug 2017 15:55:11 +0000 (01:55 +1000)]
Fix crash re-registering manipulators

Duplicating strings caused problems using strings in
both struct hash and manipulator group types own hash.

4 years agoFix T52479: Regression: Motion Tracking no longer works
Sergey Sharybin [Mon, 21 Aug 2017 15:23:42 +0000 (17:23 +0200)]
Fix T52479: Regression: Motion Tracking no longer works

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 21 Aug 2017 05:41:03 +0000 (15:41 +1000)]
Merge branch 'master' into blender2.8

4 years agoCleanup: uneven/double indentation
Campbell Barton [Mon, 21 Aug 2017 05:37:38 +0000 (15:37 +1000)]
Cleanup: uneven/double indentation

4 years agoModify menu from last commit
Campbell Barton [Mon, 21 Aug 2017 05:24:40 +0000 (15:24 +1000)]
Modify menu from last commit

Also correct tool-tip.

4 years agoFix T52434: Restore mesh center of mass calculation
Campbell Barton [Mon, 21 Aug 2017 05:06:07 +0000 (15:06 +1000)]
Fix T52434: Restore mesh center of mass calculation

The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.

4 years agoEevee: Offset the for each AA sample.
Clément Foucault [Sun, 20 Aug 2017 23:38:14 +0000 (01:38 +0200)]
Eevee: Offset the for each AA sample.

This means we have less overall noise for rendered image.
SSR, AO, and Refraction are affected by this change.

SSR still exhibit artifacts because the reconstruction pattern needs to change every frame (TODO).

4 years agoCycles: attempt to recover from crashing CUDA/OpenCL drivers on Windows.
Brecht Van Lommel [Sun, 20 Aug 2017 20:44:17 +0000 (22:44 +0200)]
Cycles: attempt to recover from crashing CUDA/OpenCL drivers on Windows.

I don't know if this will actually work, needs testing. Ref T52064.

4 years agoFix Windows build error after recent Python changes in a10a7f42.
Brecht Van Lommel [Sun, 20 Aug 2017 21:12:59 +0000 (23:12 +0200)]
Fix Windows build error after recent Python changes in a10a7f42.

4 years agoFix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
Brecht Van Lommel [Sun, 20 Aug 2017 22:05:07 +0000 (00:05 +0200)]
Fix T52473: blender internal Fresnel and Layer Weight only work with linked normal.

Please backport this to 2.79.

4 years agoRevert "Cycles: remove square samples option."
Brecht Van Lommel [Sun, 20 Aug 2017 21:46:05 +0000 (23:46 +0200)]
Revert "Cycles: remove square samples option."

This reverts commit 757c24b6bceaeeae95f743b72b6a7040880a0ebf.

We'll revisit this when doing deeper sampling changes.

4 years agoFix T52470: cycles OpenCL hair rendering not working after recent changes.
Brecht Van Lommel [Sun, 20 Aug 2017 21:16:25 +0000 (23:16 +0200)]
Fix T52470: cycles OpenCL hair rendering not working after recent changes.

4 years agoCleanup: move gawain header out of GPU_matrix
Campbell Barton [Sun, 20 Aug 2017 15:39:03 +0000 (01:39 +1000)]
Cleanup: move gawain header out of GPU_matrix

Avoids requiring glew headers in Python API.

4 years agoCode cleanup: deduplicate some bsdf node methods.
Brecht Van Lommel [Sun, 20 Aug 2017 15:36:16 +0000 (17:36 +0200)]
Code cleanup: deduplicate some bsdf node methods.

4 years agoFix T52439: Crash after adjusting lenght of hair particles.
Bastien Montagne [Sun, 20 Aug 2017 15:16:58 +0000 (17:16 +0200)]
Fix T52439: Crash after adjusting lenght of hair particles.

Regression from rBfed853ea78221, calling this inside thread worker was
not really good idea anyway, and we already have all the code we need in
pre-threading init function, was just disabled for vertex particles

To be backported to 2.79.

4 years agoCMake version bump: 3.5
Jörg Müller [Sun, 20 Aug 2017 15:01:27 +0000 (17:01 +0200)]
CMake version bump: 3.5

4 years agoCycles: support baking normals plugged into BSDFs, averaged with closure weight.
Brecht Van Lommel [Sun, 20 Aug 2017 01:25:13 +0000 (03:25 +0200)]
Cycles: support baking normals plugged into BSDFs, averaged with closure weight.

4 years agoManipulator: helper API for drawing custom shapes
Campbell Barton [Sun, 20 Aug 2017 13:39:55 +0000 (23:39 +1000)]
Manipulator: helper API for drawing custom shapes

This exposes 2 methods for manipulators:
- new_custom_shape
- draw_custom_shape

This can be used for script authors to create and re-use shapes
without dealing with lower level API's.

4 years agoPyAPI: add (initial module)
Campbell Barton [Sun, 20 Aug 2017 13:01:46 +0000 (23:01 +1000)]
PyAPI: add (initial module)

This only exposes load_id, it's needed for Python manipulator drawing.

4 years agoManipulator: add read-only matrix_world
Campbell Barton [Sun, 20 Aug 2017 12:44:22 +0000 (22:44 +1000)]
Manipulator: add read-only matrix_world

4 years agoCode cleanup: remove copy of shader graph for bump, no longer needed.
Brecht Van Lommel [Sun, 20 Aug 2017 12:02:16 +0000 (14:02 +0200)]
Code cleanup: remove copy of shader graph for bump, no longer needed.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 20 Aug 2017 11:16:08 +0000 (21:16 +1000)]
Merge branch 'master' into blender2.8

4 years agoReplace BLI_INLINE w/ Py_LOCAL_INLINE for Python
Campbell Barton [Sun, 20 Aug 2017 11:14:33 +0000 (21:14 +1000)]
Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python

Recent inclusion caused build error with the BGE.

4 years agoPyAPI: gpu.matrix.push_pop context manager
Campbell Barton [Sun, 20 Aug 2017 09:31:59 +0000 (19:31 +1000)]
PyAPI: gpu.matrix.push_pop context manager

Avoid un-balanced push/pop usage (which can interfere with Blender's
internal state) using a context manager.

4 years agoFix bpy library load: invalid function signature
Campbell Barton [Sun, 20 Aug 2017 09:04:16 +0000 (19:04 +1000)]
Fix bpy library load: invalid function signature

4 years agoPyAPI: Add exceptions to stack push/pop
Campbell Barton [Sun, 20 Aug 2017 07:23:49 +0000 (17:23 +1000)]
PyAPI: Add exceptions to stack push/pop

Raise exception when stack limits are reached.

4 years agoPyAPI: use PyC_Long_As... for gawain
Campbell Barton [Sun, 20 Aug 2017 05:58:37 +0000 (15:58 +1000)]
PyAPI: use PyC_Long_As... for gawain

Avoids inline overflow checks.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 20 Aug 2017 05:50:15 +0000 (15:50 +1000)]
Merge branch 'master' into blender2.8

4 years agoPyAPI: Make use of PyC_LongAs... API
Campbell Barton [Sun, 20 Aug 2017 05:44:54 +0000 (15:44 +1000)]
PyAPI: Make use of PyC_LongAs... API

Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.

Some inline exceptions are kept because they show useful details.

4 years agoPyAPI: Integer conversion functions
Campbell Barton [Sun, 20 Aug 2017 05:39:08 +0000 (15:39 +1000)]
PyAPI: Integer conversion functions

Python's C-API doesn't provide functions to get
int's at specific integer sizes.

Leaving the caller to check for overflow,
which ended up being ignored in practice.

Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.

4 years agoPyAPI: avoid redundant PyLong_AsLong call
Campbell Barton [Sun, 20 Aug 2017 05:28:06 +0000 (15:28 +1000)]
PyAPI: avoid redundant PyLong_AsLong call

Assigning to an RNA array converted from Python to C twice.

4 years agoPyAPI: correct int range checking
Campbell Barton [Sun, 20 Aug 2017 00:34:21 +0000 (10:34 +1000)]
PyAPI: correct int range checking

4 years ago[windows/make.bat] add option to automatically download libs.
Ray Molenkamp [Sat, 19 Aug 2017 18:00:30 +0000 (12:00 -0600)]
[windows/make.bat] add option to automatically download libs.

The thing that most often still goes wrong for new users building blender on windows is checking out the libraries, some skip over the wiki, some check out to the wrong folder, in an effort to reduce the time i spend on this, I added detection of svn and misisng libs to make.bat .

When the user has svn installed, and the libdir is missing he'll be asked if he wants to download them

if svn is not installed, or the user chooses 'no' the current error message is shown.

Reviewers: Blendify, sergey, juicyfruit

Reviewed By: sergey

Differential Revision:

4 years agoFix T52452: OSL trace broken after shadow catcher recent changes.
Brecht Van Lommel [Sat, 19 Aug 2017 13:42:43 +0000 (15:42 +0200)]
Fix T52452: OSL trace broken after shadow catcher recent changes.

We should only early out with any hit in BVH traversal if the only visibility
bits used are opaque shadow. Not when opaque shadow is one of multiple bits.

4 years agoCycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
Brecht Van Lommel [Sat, 19 Aug 2017 10:09:28 +0000 (12:09 +0200)]
Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.

This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.

4 years agoCode cleanup: move rng into path state.
Brecht Van Lommel [Sat, 19 Aug 2017 02:11:25 +0000 (04:11 +0200)]
Code cleanup: move rng into path state.

Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.

4 years agoPyAPI: Add gpu.matrix API
Campbell Barton [Sat, 19 Aug 2017 14:01:19 +0000 (00:01 +1000)]
PyAPI: Add gpu.matrix API

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 19 Aug 2017 11:54:05 +0000 (21:54 +1000)]
Merge branch 'master' into blender2.8

4 years agoPyAPI: expose matrix parsing function
Campbell Barton [Sat, 19 Aug 2017 11:36:50 +0000 (21:36 +1000)]
PyAPI: expose matrix parsing function

4 years agoCorrect error in gawain wrapper for non-gcc compilers
Campbell Barton [Sat, 19 Aug 2017 10:18:23 +0000 (20:18 +1000)]
Correct error in gawain wrapper for non-gcc compilers

4 years agoAudaspace: cmake fixes, lowering to 3.0 minimum required.
Jörg Müller [Sat, 19 Aug 2017 09:45:20 +0000 (11:45 +0200)]
Audaspace: cmake fixes, lowering to 3.0 minimum required.

4 years agoCleanup: remove unneeded include
Campbell Barton [Sat, 19 Aug 2017 07:16:24 +0000 (17:16 +1000)]
Cleanup: remove unneeded include

Complicated using GPU_matrix from PyAPI.

4 years agoEevee: Bloom: Add Bloom Color
Clément Foucault [Sat, 19 Aug 2017 00:40:02 +0000 (02:40 +0200)]
Eevee: Bloom: Add Bloom Color

Moar artistic control yay!

4 years agoEevee: Bloom: Add Clamp setting
Clément Foucault [Sat, 19 Aug 2017 00:39:16 +0000 (02:39 +0200)]
Eevee: Bloom: Add Clamp setting

It's purpose is to limit the amount of light that spread across the screen.

Not entierly sure if it's very usefull, but it sure help to avoid to drown the screen in bloom.

4 years agoEevee: Fix problem with GPU_texture_generate_mipmap
Clément Foucault [Fri, 18 Aug 2017 20:31:06 +0000 (22:31 +0200)]
Eevee: Fix problem with GPU_texture_generate_mipmap

This function was called to recreate the lower mip level of the probe texture. But this is not it's usage and it introduced a stall.

This patch add cubemap mipmap level regeneration in eevee_effects.c

4 years agoFix T52443: Cycles OpenCL build error after recent mesh lights changes.
Brecht Van Lommel [Fri, 18 Aug 2017 21:50:54 +0000 (23:50 +0200)]
Fix T52443: Cycles OpenCL build error after recent mesh lights changes.

4 years agoCMake: Boost no longer needed for Audaspace references either
Jörg Müller [Fri, 18 Aug 2017 17:07:39 +0000 (19:07 +0200)]
CMake: Boost no longer needed for Audaspace references either

4 years agoCycles tests: add light type tests.
Brecht Van Lommel [Fri, 18 Aug 2017 15:09:12 +0000 (17:09 +0200)]
Cycles tests: add light type tests.

4 years agoCycles tests: make page less wide, use relative URLs for serving through http.
Brecht Van Lommel [Thu, 17 Aug 2017 22:37:45 +0000 (00:37 +0200)]
Cycles tests: make page less wide, use relative URLs for serving through http.

4 years agoEevee: Convert metallic nodes into princinpled nodes
Dalai Felinto [Fri, 18 Aug 2017 14:40:04 +0000 (16:40 +0200)]
Eevee: Convert metallic nodes into princinpled nodes

And wipe metallic out of the map.

4 years agoSwap Eevee material output with (Cycles) Material Output
Dalai Felinto [Thu, 17 Aug 2017 13:54:05 +0000 (15:54 +0200)]
Swap Eevee material output with (Cycles) Material Output

Since we started supporting the (Cycles) Material Output old files
stopped working. There is no reason to keep the original Eevee material
otuput anymore.

It includes doversion for old files.

4 years agoExpose Transparency BSDF for Eevee UI
Dalai Felinto [Fri, 18 Aug 2017 14:07:57 +0000 (16:07 +0200)]
Expose Transparency BSDF for Eevee UI

4 years agoUniform Buffer Objects: More complete padding solution
Dalai Felinto [Fri, 18 Aug 2017 14:42:58 +0000 (16:42 +0200)]
Uniform Buffer Objects: More complete padding solution

Move floats around when needed to accomodate vec3 arrays efficiently.

With this we use slightly less memory when possible. Basically vec3s are not
treated as vec4 unless we have no float to use for padding).

Reviewers: fclem, sergey

Differential Revision:

4 years agoEevee: Rework GTAO
Clément Foucault [Fri, 18 Aug 2017 13:06:51 +0000 (15:06 +0200)]
Eevee: Rework GTAO

This includes big improvement:
- The horizon search is decoupled from the BSDF evaluation. This means using multiple BSDF nodes have a much lower impact when enbaling AO.
- The horizon search is optimized by splitting the search into 4 corners searching similar directions to help which GPU cache coherence.
- The AO options are now uniforms and do not trigger shader recompilation (aka. freeze UI).
- Include a quality slider similar to the SSR one.
- Add a switch for disabling bounce light approximation.
- Fix problem with Bent Normals when occlusion get very dark.
- Add a denoise option to that takes the neighbors pixel values via glsl derivatives. This reduces noise but exhibit 2x2 blocky artifacts.

The downside : Separating the horizon search uses more memory (~3MB for each samples on HD viewport). We could lower the bit depth to 4bit per horizon but it produce noticeable banding (might be fixed with some dithering).

4 years agoEevee: Add some utils functions
Clément Foucault [Fri, 18 Aug 2017 12:24:29 +0000 (14:24 +0200)]
Eevee: Add some utils functions

4 years agoEevee: MinmaxZ: Avoid unecessary conversions.
Clément Foucault [Fri, 18 Aug 2017 12:23:25 +0000 (14:23 +0200)]
Eevee: MinmaxZ: Avoid unecessary conversions.

4 years agoGPU_texture : Add RG8 format.
Clément Foucault [Fri, 18 Aug 2017 12:22:40 +0000 (14:22 +0200)]
GPU_texture : Add RG8 format.

4 years agoEevee: Fix some problem with Glass & Diffuse BSDF with SSR
Clément Foucault [Tue, 15 Aug 2017 07:36:23 +0000 (09:36 +0200)]
Eevee: Fix some problem with Glass & Diffuse BSDF with SSR

Diffuse was not outputing the right normal. (this is not a problem with SSR actually)

Glass did not have proper ssr_id and was receiving environment lighting twice.
Also it did not have proper fresnel on lamps.

4 years agoFix ubo vec3 alignment issue
Dalai Felinto [Fri, 18 Aug 2017 10:00:30 +0000 (12:00 +0200)]
Fix ubo vec3 alignment issue

This fixes the Principled shader in Eevee, among other nodes.

Basically before we were treating all the vec3 as vec4 as far as memory
goes. We now only do it when required (aka, when the vec3 is not
followed by a float).

We can be even smarter about that and move the floats around to provide
padding for the vec3s. However this is for a separate patch.

That said, there seems to be some strong consensus in corners of the
internet against using vec3 at all [1]. Basically even if we get all the
padding correct, we may still suffer from poor driver implementations in
some consumer graphic cards.

It's not hard to move to vec4, but I think we can avoid doing it as much
as possible. By the time 2.8 is out hopefully most drivers will be
implementing things correctly.

[1] -

4 years agoPyAPI: Gawain checks for range
Campbell Barton [Fri, 18 Aug 2017 07:56:10 +0000 (17:56 +1000)]
PyAPI: Gawain checks for range

Raise error on vert-buffer data overflow.
Also exception on attempting to fill data thats already on the GPU.

4 years agoPyAPI: Fix memory leak w/ empty, allocated enums
Campbell Barton [Fri, 18 Aug 2017 08:29:27 +0000 (18:29 +1000)]
PyAPI: Fix memory leak w/ empty, allocated enums

4 years agoCMake: Boost no longer needed for Audaspace
Campbell Barton [Fri, 18 Aug 2017 08:16:39 +0000 (18:16 +1000)]
CMake: Boost no longer needed for Audaspace

4 years agoFix building w/o Audaspace
Campbell Barton [Fri, 18 Aug 2017 08:16:13 +0000 (18:16 +1000)]
Fix building w/o Audaspace

4 years agoAudaspace: Moving audaspace 1.3 into extern.
Jörg Müller [Fri, 18 Aug 2017 06:24:12 +0000 (08:24 +0200)]
Audaspace: Moving audaspace 1.3 into extern.

Deleting the old internal audaspace.

Major changes from there are:
- The whole library was refactored to use C++11.
- Many stability and performance improvements.
- Major Python API refactor:
 - Most requested: Play self generated sounds using numpy arrays.
 - For games: Sound list, random sounds and dynamic music.
 - Writing sounds to files.
 - Sequencing API.
 - Opening sound devices, eg. Jack.
- Ability to choose different OpenAL devices in the user settings.