1
1
Commit Graph

118475 Commits

Author SHA1 Message Date
81c4833a0d Experiment with 1M instances fast generation 2022-10-12 09:49:59 +02:00
5a10182a70 port of workbench_data.c is now complete 2022-10-10 18:08:08 +02:00
7c59b0b836 Allow passing View3DShading directly to XRAY macros
Prevents code duplication by handling View3D.shading and SceneDisplay.shading in the same code path.
2022-10-10 18:06:50 +02:00
4b65c0ad54 world orientation 2022-10-10 15:38:10 +02:00
8501e93dea Refactor
Split workbench_engine.cc into multiple files.
Move all the SceneResources loading logic directly into Instance.
2022-10-10 13:45:45 +02:00
219d5a9530 Basic vertex colors 2022-10-07 16:20:46 +02:00
ce54a09cdd Fix: Use 16F texture target for gbuffer_material
Needed for fitting the roughness/metalness using the current encoding
2022-10-07 16:10:30 +02:00
65a069b539 Revert "Fix workbench_float_pair encode/decode"
This reverts commit 79f15f68c5.
2022-10-07 16:06:04 +02:00
79f15f68c5 Fix workbench_float_pair encode/decode
Set them into the 0-1 range so they fit in unorm textures.
2022-10-07 15:49:14 +02:00
dfd61be20e Keep WorldData and WORKBENCH_UBO_World in sync 2022-10-07 13:52:31 +02:00
cde0faf4dd add support for background color 2022-10-06 20:09:18 +02:00
106c6db1b5 fix ssbo binding 2022-10-06 20:08:47 +02:00
2739e186b6 Workbench Next: Add color modes, flat shading and backface culling
Adds support for Material, Random, Single and Object color modes.
Adds flat shading support.
Adds backaface culling support.
prepass_shader_cache_ is actually used now.
2022-10-06 16:50:08 +02:00
f1851fa35c Workbench next: Render the same UI as the regular Workbench engine
Register as compat engine in the UI code.
2022-10-05 16:11:26 +02:00
71c9746ec6 Fix several bug in order to draw simple scene correctly 2022-10-05 12:39:42 +02:00
d6457310d8 Fix: Compilation issue on msvc
Since smaa_textures.h is now included in cpp compilation units, areaTexBytes and searchTexBytes must be declared as extern "C".
2022-10-05 12:32:00 +02:00
db6665813b Fix compilation and rendering errors
Now displays white canvas
2022-10-03 23:59:47 +02:00
bc28bf3681 Fix experimental option and add SMAA 2022-10-03 16:46:24 +02:00
43dad4d9b1 WORKBENCH: Rewrite using the new Draw Manager API
This adds a new experimental option for testing the new rewrite.

This is a full rewrite using C++ and using the new DRW API.
This tries to simplify each aspect of the engine:
- Materials are put in SSBOs.
- Only one shader per pass.

The goal is to leverage the new DRW capabilities in term of GPU culling
and drawcall batching.
2022-10-03 13:33:20 +02:00
Jason Fielder
0fdb9cd650 GPU: Fix issue with GPU render boundaries being opened while a GPUBackend does not exist.
Fixes regression introduced by rBe8bcca4bdc94 (D15900)

Ref T96261

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D16085
2022-10-02 00:08:52 +02:00
Pratik Borhade
ffd8390af7 Fix T101504: Crash when repeat value is zero
Crash triggers due to division by zero
fix is to increase minimum limit for `seg_repeat` to 1

Reviewed By: antoniov, frogstomp

Maniphest Tasks: T101504

Differential Revision: https://developer.blender.org/D16120
2022-10-01 16:28:29 +02:00
e5ccbfab09 Cleanup: simplify uv packing for non-square materials 2022-10-01 17:29:14 +13:00
206dead860 Sculpt: Fix T101467: Improper vertex count in pbvh draw 2022-09-30 15:40:50 -07:00
81f15a51aa Sculpt: Fix sculpt face set undo creating duplicate face set layers 2022-09-30 15:35:11 -07:00
991a35b844 Sculpt: fix crash in relax face sets brush 2022-09-30 15:32:01 -07:00
6b9f45c1d1 Sculpt: Fix T101430: Dyntopo undo crash 2022-09-30 15:28:26 -07:00
5b0485fd77 Sculpt: Upload white for color attributes in multires in sculpt
Even if multires in sculpt mode doesn't yet support color
attributes, we should at least upload white color to avoid
making everything black.

Also fixed a bug where multires PBVHs didn't have access to
their CustomData attribute layout, which PBVH draw needs.
2022-09-30 15:19:10 -07:00
1eba76d8ed Sculpt: Fix T101503: Memory corruption in multires faceset drawing 2022-09-30 15:02:50 -07:00
4cbafba04b Sculpt: Fix T101430: Curve shown improperly in mask from cavity redo 2022-09-30 14:56:06 -07:00
554afabf75 Attribute Node: refactor lookup to remove duplication between engines.
Currently lookup of Object and Instancer attributes is completely
duplicated between Cycles, Eevee and Eevee Next. This is bad design,
so this patch aims to deduplicate it by introducing a common API
in blenkernel.

In case of Cycles this requires certain hacks, but according to
Brecht it is planned to be rewritten later for more direct access
to internal Blender data anyway.

Differential Revision: https://developer.blender.org/D16117
2022-09-30 20:01:57 +03:00
42eda155df Cleanup: Move draw_manager_data.cc to C++
This will help with moving mesh runtime data to C++
2022-09-30 09:38:02 -05:00
8ba508d70b Fix missing Outliner updates when adding nodetrees
When e.g. grouping nodes into nodegroups, these would not show up
immediately in the Outliner (Blender File / Data API view).

Now send (unique combination, not used elsewhere) notifiers (and listen
for these in the Outliner).

Differential Revision: https://developer.blender.org/D16093
2022-09-30 11:53:03 +02:00
2004827bc9 Fix T101347: Curve draw fails to project to cursor depth in ortho views
ED_view3d_win_to_3d_on_plane with do_clip enabled wasn't working in
non-camera orthographic views as it didn't take into account the ray
origin being centered to the view.

Resolve by testing viewport clipping after the ray has been projected.
2022-09-30 18:29:26 +10:00
68ac737d48 Cleanup: format 2022-09-30 10:28:11 +02:00
6865aab133 Cleanup: quiet unused parameter warning in lambda function
Copy-paste error in rB039429faeb41.
2022-09-30 10:27:48 +02:00
dbc097d6b8 Fix error in blf_get_sample_text returning a pointer to stack memory
Copy-by-value was used when iterating over unicode_samples which
then referenced an array from the value.

Resolve by referencing a const pointer to the unicode_sample array.
2022-09-30 15:03:18 +10:00
8bdd4b4685 Cleanup: use function style casts for C++ 2022-09-30 14:51:49 +10:00
1c1dc5f844 Cleanup: Move files that use mesh runtime data to C++
In preparation for moving the mesh runtime struct out of DNA.
2022-09-29 18:32:44 -05:00
7db79feecd Cleanup: Move object_update.c to C++ 2022-09-29 17:11:20 -05:00
0ff485b6ba Cleanup: Move modifier.c to C++ 2022-09-29 16:43:09 -05:00
3059c0998a Fix T101118, T101471: Crash with bevel weight in solidify modifier
Just a missing null check for the original edge weight.
2022-09-29 16:40:13 -05:00
688c4f7e51 Sculpt: fix stroke-only attributes not being freed at stroke end 2022-09-29 13:45:17 -07:00
b063cfa9cf Sculpt: fix T101465, crash in cloth filter with new automasking modes 2022-09-29 13:38:16 -07:00
6a9b45995d Sculpt: Fix T101464: Crash in mask from cavity 2022-09-29 13:14:42 -07:00
f998fa2732 Sculpt: Fix T101463: Don't initialize automask to zero in
factor mode if topology or boundary modes are inactive

Factors mode (precomputing the automask) should initialize the
mask to 1.0 if no additive automasking modes are enabled, instead
of zero.
2022-09-29 13:06:55 -07:00
c938447ee2 Cleanup: Naming in edge vertices node
- Use `enum class`
- Use shorter names for field input classes for better line wrapping
- Use "Vert" instead of "Vertex"
2022-09-29 15:01:10 -05:00
912a1e2820 Fix: Order of node mixins in custom nodes python template
See T101259. This order makes the poll not work, even when called from
Python. The bundled template shouldn't be a source of errors for node
addons.
2022-09-29 11:59:02 -05:00
c007e84e9e Fix: Viewer node overlay alpha broken on NVidia GPUs
On NVidia GPUs, when the blue channel was between 0 and 0.1,
the overlay's alpha would increase, making it invisible.

With the `overlay_line_fb` frame buffer bound in `overlay_engine.cc`
there are two outputs to write to: the color and the line output, which
is used for making smooth antialiased lines. The overlay is in its
current position in the order of overlays so that it draws on top of
curve wire lines. Not writing to that second output is undefined
behavior, so fix it by writing zeros. In the future, the overlay
could be smoothed on curves using that second texture.

Thanks to Clément for the explanation of the issue!
2022-09-29 11:28:48 -05:00
520d111eca Cleanup: Simplify code and remove duplications
This commit simplify the previous fix for T101455

f6c2f1c65e
2022-09-29 15:03:23 +02:00
d2e576f34c GPencil: Remove Fill use_collide_only option
After a lot of testing, this option is not required and
now this is managed by stroke_collsion.

If the stroke_collision is enabled, only collide strokes 
are used.
2022-09-29 14:58:29 +02:00