Commit Graph

1968 Commits

Author SHA1 Message Date
Clément Foucault
04067a54c0 GPUShader: Fix previous "old Nvidia" fix commit
Note to myself, next time, better check the fix before pushing it.

GL_ARB_texture_gather is defined if there is support for the extension
not only when the extension is enabled. Do this check ourself with
GPU_ARB_texture_gather define.

Original fix 822de6e9e1
2018-08-13 23:09:48 +02:00
Clément Foucault
53ed270523 Fix T56298: Rendering glitch when bones are in stick mode in ortho view 2018-08-13 23:01:18 +02:00
Clément Foucault
efd44f8480 Cleanup: GPU codegen: remove most of legacy code
A lot of code in codegen was used by previous GLSL system.
Now most of it is not used due to all the things being written from scratch
in 2.8 and we can clean most of it.

As a side not this make the system a bit less flexible (no support for
cubemaps, preview image, etc...) but can be extended again.
2018-08-13 23:01:18 +02:00
Clément Foucault
822de6e9e1 Fix T55802 shader compile bug with texture gather on old Nvidia card
The extension GL_ARB_texture_gather is reported to be supported and does
not trigger an error when enabled but the textureGater functions are not
defined.

Workaround is to disable the use of this extension on such systems.
2018-08-13 23:01:18 +02:00
Antonioya
b4b8d3ab0e Cleanup: Fix wrong formatting
For unknown reasons, visual studio unformat a section of the code.
2018-08-11 20:54:13 +02:00
Antonioya
f22d8ee94c Cleanup: Remove debug print 2018-08-11 10:03:06 +02:00
Antonioya
92b12d914f Cleanup GP instance: Remove element 0 because is duplicated 2018-08-11 09:59:44 +02:00
Clément Foucault
2cbffc8e40 Eevee: Fix assert with object volume rendering 2018-08-10 16:16:35 +02:00
Clément Foucault
bf6a22ed6f GPUMaterial: Group all colorband texture together
This lower the use of texture samplers slots and let users use more real
textures in their shaders.

This patch also make the ramp texture 16 bit floating point. Meaning you
can now use value greater than one in your color ramps.

With the limit of 128 colorband per shader (a color band being either a
color ramp, a wavelength node or a curve node (and maybe wavelength node in
the future)).

Only drawback with the current implementation is that it does not remove
colorband from pruned GPUNodes but it shouldn't really matter in practice.

This should fix T56010
2018-08-10 16:16:35 +02:00
Antonioya
69d710187d Fix unreported assert error when change instance modifier
Doing very fast change in the number of instances soemtimes get an error of duplicate ghash entry.
2018-08-10 13:14:13 +02:00
Campbell Barton
eb7b450c0c Cleanup: style 2018-08-10 08:14:22 +10:00
Rohan Rathi
2b41b208c7 Merge branch 'soc-2018-bevel' into blender2.8 2018-08-09 19:52:07 +05:30
Rohan Rathi
fea5f26ea5 Fix trivial error in call 2018-08-09 18:56:46 +05:30
Rohan Rathi
42c2066d08 Fixed custom shading not updating in Edit Mode 2018-08-09 18:38:07 +05:30
Clément Foucault
c009b09f12 Eevee: Fix Clearcoat intensity 2018-08-08 21:27:33 +02:00
Clément Foucault
b8fc6317c7 Eevee: Remove per material SSS toggle
This is because we can now optimize the use of SSS on shaders based on
socket input values.
2018-08-08 21:27:33 +02:00
Clément Foucault
cac43e1765 Eevee: Use "constant folding" for the principle shader
This is more like a static optimisation when some parameters are set to 1.0
or 0.0. In theses case we use a more optimized version of the node.

This also revisit the transmission parameter behaviour to make it closer to
cycles.
2018-08-08 21:27:26 +02:00
Clément Foucault
82352565b7 Eevee: Remove some of the non-necessary uniforms
The remaining ones are from the attributes linear/srgb switches and from
nodes that should be pruned before running their _gpu function.
2018-08-08 21:26:49 +02:00
Antonioya
211ad6bf9a GP: Fix memory leak in draw engine for buffer strokes
This memory leak was undetected during a long time, but with new memory checking is visible.

The problem was the stroke buffer batch was realocating new batches without free the memory.
2018-08-08 19:48:57 +02:00
Antonioya
3e0bf69bfd GP: Change to make the temp name unique
The previous commit could fail if some corner situations. This new temp name must be unique always.
2018-08-08 11:48:18 +02:00
Antonioya
106e73da82 Fix T56270: Crash when save a grease pencil file with instance modifier.
The error was related to duplicate names in the internal hash used to order instances in z-depth.
2018-08-08 11:11:18 +02:00
Antonioya
65b31a4c9c GP: Check render status before use it. 2018-08-08 11:11:18 +02:00
Campbell Barton
bbaedad632 Minor tweak to last commit 2018-08-08 16:02:45 +10:00
Campbell Barton
ff74292138 3D View: hide object centers in paint modes
Match 2.7x behavior
2018-08-08 15:53:02 +10:00
Campbell Barton
b6dba5caac Vertex Paint: use original mesh data
This is already done in weight paint mode,
avoids a mesh refresh on selection changes.
2018-08-08 15:17:30 +10:00
Campbell Barton
cb15854bf9 Fix missing uniform for vert/weight/texture paint
Entering any of these modes would assert immediately.
2018-08-08 15:08:50 +10:00
Campbell Barton
cb58658f41 Cleanup: style 2018-08-08 10:59:50 +10:00
Antonioya
d04e8f41ae Cleanup GP: Change playing field to boolean 2018-08-07 13:56:30 +02:00
Antonioya
563e17091d GP: Add Simplify Shader FX option
This option was missing when old VFX modifers were backported as Shader FX.
2018-08-06 17:01:47 +02:00
Antonioya
d07a408a40 GP: Fix Front z-depth display precision
The zdepth 0 was clipped and need 0.000001
2018-08-06 16:11:53 +02:00
Clément Foucault
f55863acd4 DRW: Augment Debug messages 2018-08-03 09:49:31 +02:00
Clément Foucault
fa0f938b11 Eevee: Fix assert with hair drawing
This remove unused clip_block when not needed and the useless ubo bind that
were put there for the sake of not crashing.
2018-08-03 09:49:31 +02:00
Clément Foucault
2a8413a0dd Eevee: Don't show probe display when not using scene lighting
The display is broken otherwise.
2018-08-02 21:12:08 +02:00
Clément Foucault
9887b32e73 Eevee: Fix missing UBO bind. 2018-08-02 20:52:07 +02:00
Clément Foucault
acdb136dce DRW: Add UBO binding checking routine. 2018-08-02 18:33:49 +02:00
Clément Foucault
e7adf1dfb0 Cleanup: Fix compilation warnings. 2018-08-02 18:33:49 +02:00
Clément Foucault
bd7ab6b989 DRW: Cleanup: Fix header naming. 2018-08-02 18:33:49 +02:00
Clément Foucault
8f6ff3adfa GPUShader: Add name for debugging & identifying shaders. 2018-08-02 18:33:49 +02:00
Clément Foucault
3578212e46 Eevee: Fix missing UBO binds.
Some of them are unecessary and should be removed from the shader instead.

But for now we need a quick fix for the crashes happening on some platforms.

See T55475.
2018-08-02 18:33:49 +02:00
Campbell Barton
918288138d Cleanup: warnings, trailing space 2018-08-02 08:26:57 +10:00
Brecht Van Lommel
c48eb52164 Fix Cycles headless render failing, after grease pencil merge.
Now it should at least succeed when there are no grease pencil objects.
2018-08-01 14:47:02 +02:00
Bastien Montagne
936d1cef6e Merge branch 'blender2.8' into soc-2018-bevel
Conflicts:
	release/scripts/addons
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
	source/blender/editors/space_outliner/outliner_draw.c
2018-08-01 14:16:41 +02:00
Antonioya
ddd62f1b10 Cleanup: Remove ToDo comment 2018-08-01 11:21:37 +02:00
Antonioya
20e5fc4d32 Fix context problem when render in background mode
Bug reported by Sergey.
2018-08-01 10:58:10 +02:00
Campbell Barton
29937dce8f Merge branch 'master' into blender2.8
Move 'View3D.flag3' options into 'gp_flag'.
2018-08-01 08:42:00 +10:00
Clément Foucault
7e0eb0d071 GPUFrameBuffer: Put active framebuffer in GPUContext
instead of being ThreadLocal and leading to incorrect usage.

We still enforce no framebuffer when changing context. We can lift this
restriction later.
2018-07-31 18:21:23 +02:00
Antonioya
7a91ae1103 Fix memory leak in DRW_cache_gpencil_axes_get
The Batch was created using old function without  GPU_BATCH_OWNS_VBO and the batch was not removed from memory
2018-07-31 13:22:41 +02:00
Campbell Barton
31fcd40efd Cleanup: use static variables 2018-07-31 20:45:43 +10:00
Antonioya
20d525eb8b Fix assert when load file with shading enabled
Credits for this fix goes to Clément Foucault.
2018-07-31 12:37:58 +02:00
Campbell Barton
f06884b18a Cleanup: style, duplicate includes 2018-07-31 20:11:55 +10:00