Commit Graph

220 Commits

Author SHA1 Message Date
fb3b2ab709 Cleanup: Remove unused code in sculpt_mode, workbench and draw manager 2019-05-04 14:11:04 +02:00
102daed1f2 Cleanup: Draw Manager: remove DRW_state_invert_facing 2019-05-02 16:51:45 +02:00
e6705fad33 DRW: Add DRW_STATE_BLEND_PREMUL_UNDER
Just basic alpha under operation with premultiplied source.
2019-05-01 12:09:18 +02:00
63f0e150ed Cleanup: comments (long lines) in draw 2019-05-01 10:51:10 +10:00
93c19a5a2c Cleanup: comments (mainly long lines)
Comments after code can cause awkward line breaks.
2019-04-21 14:27:35 +10:00
2fb9c8ef12 Cleanup: add missing macros to clang-format 2019-04-21 04:40:16 +10:00
41d4a19865 ClangFormat: format '#if 0' code in source/ 2019-04-17 08:24:14 +02:00
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
fefc9c95e4 DRW: Opti: Replace bound tex/ubo tracking array by bitfields
release_texture_slots() and release_ubo_slots() were one hotspot when
drawing taking ~9% of total CPU counters for no reason.

This was because of the loops using GPU_max_textures that was overkill and
slow.

Replace those by a simple 64bit bitwise OR operation.
2019-04-05 21:15:25 +02:00
42dd888b98 Fix T62178 Eevee: Texture Box mapping not matching Cycles if object is scaled
The wrong transformation was used. Add a new matrix specially for this case.

This also fix the Node texture coordinate that was suffering the same issue.
2019-03-28 22:08:54 +01:00
afaa832a85 Fix T62680 Mirrored objects have flipped binormal vectors in LookDev
Pass binormal sign via object info.
2019-03-27 20:21:10 +01:00
73b55a5508 Cleanup: style, use braces for draw 2019-03-28 01:14:03 +11:00
2b42b8b779 BLI Math: Add and use new projmat_dimensions utility. 2019-03-21 22:23:49 -03:00
cc1b193ddf Revert "Fix T62621 object scale changes tangent node output in Eevee"
This reverts commit 86646dab7c.
2019-03-22 00:13:18 +01:00
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
86646dab7c Fix T62621 object scale changes tangent node output in Eevee
Normal Matrices were not normalized, leading to non-normalized vector
rotations results.
2019-03-15 22:33:03 +01:00
af72fc7555 DRW: Fix State tracking being off when calling GPU_framebuffer_clear
State tracking works in pretty much all cases but calling the clear command
does change the write mask outside the draw manager. For now we just reset
the write mask before each pass.

Fix T62203 The selected bone is not highlighted inside the other bone.
2019-03-06 03:38:56 +01:00
85b667716a Cleanup: style 2019-03-06 10:51:11 +11:00
81283b1c81 DRW: Fix rasterizer discard messing with clear commands
Fixes T62179 Viewport Ghosting on rigs
2019-03-05 17:24:39 +01:00
798d2cadc3 DRW: Remove unecessary state changes
The TODO is old and the issue does not seems to appear anymore.

If bugs emerge from this commit it's most likely to be a bad usage of the
API.
2019-03-04 01:30:02 +01:00
9d309b7978 Cleanup: quiet undeclared variable warning
Also move view_ubo into G_draw.
2019-02-23 19:20:20 +11:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
a131514d0f Edit Mesh: Fix some problem with new implementation
- Add manual depth offset to vertices and edges.
- Revert to plain edge decoration.
- Fix active edge coloring.
- Remove active face display if not in face selection mode.
- Add wide line support.
2019-02-05 15:02:15 +01:00
afcbf7cf13 Cleanup: use G_FLAG_*/G_FILE_* for G.f/fileflags
Was confusing eg: G_AUTOPACK belonged to G.fileflags, G_PICKSEL to G.f.
2019-02-02 13:49:13 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
19b5f5493c Cleanup: draw manager headers 2019-01-26 20:08:52 +11:00
a4fe338dd8 Cleanup: add missing braces to draw manager 2019-01-25 07:12:13 +11:00
dc3b5024be Cleanup: add BEGIN/END to GPL headers 2019-01-23 11:32:43 +11:00
14b5668c60 DRW: Fix corner indices order in clipping plane setup
Fix T60667: Eevee: reflection plane bug in rendered view.
2019-01-21 15:21:17 +01:00
9bc47ed0f6 Fix clipping shaders with some AMD/Intel drivers
Caused:
    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.
2019-01-21 23:55:53 +11:00
ff10ba8c26 Cleanup: rename terms count/num to len 2019-01-21 11:24:19 +11:00
d5b4d71ee7 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
2019-01-18 10:23:05 +01:00
e3b3b32076 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.
2019-01-17 19:48:00 +01:00
9200dc0eb1 Cleanup: preprocessor indentation 2019-01-03 15:52:07 +11:00
1ac311cedc Fix/cleanup another bunch of UI messages issues.
Also (mostly in comments): behaviour -> behavior (we use American English).
2018-12-24 12:32:43 +01:00
8ded149bfc DRW: Polygon Offset: Also offset lines and points 2018-12-18 02:19:52 +01:00
7d4d9e9dbd Cleanup: style 2018-12-13 12:30:38 +11:00
1b8e1bb635 DRW: Add polygon offset mode. 2018-12-11 18:18:36 +01:00
8c8e9b5586 DRW: Deprecate / Remove DRW_STATE_STIPPLE_*
This was unused and used the old drawing paradygm
2018-12-10 23:17:20 +01:00
88d36e6456 DRW: Add Provoking vertex state. 2018-12-07 05:33:17 +01:00
8af53dbeab Workbench: Fix volumetric blending leading to corrupted render results
Use simpler premultiplied blending.
2018-11-07 00:19:14 +01:00
819e6745b0 DRW: Use GPU module wrapper for line width 2018-11-02 15:45:13 +01:00
e234ce9b22 Eevee: Add support/Fix Object Info node
Caveat: Random output does not yet work with instance (dupli) objects.
2018-10-09 17:34:04 +02:00
6b433f4eb3 Merge branch 'master' into blender2.8 2018-09-19 18:20:50 +02:00
4b89bf88c7 Revert "DRW: Remove unecessary GL calls"
This reverts commit f8c857ad72.
2018-08-27 18:02:48 +02:00
f8c857ad72 DRW: Remove unecessary GL calls 2018-08-26 23:54:47 +02:00
cb65542d2c DRW: Fix incorrect default stencil value 2018-08-14 21:38:13 +02:00
f55863acd4 DRW: Augment Debug messages 2018-08-03 09:49:31 +02:00