WIP: Vulkan: Workbench #107886

Closed
Jeroen Bakker wants to merge 88 commits from Jeroen-Bakker:vulkan-draw-manager-workbench into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

This PR contains many smaller changes in order to get workbench working. This PR will be separated into smaller pieces and those will land.

TODO

  • There is a mismatch when using texel buffers compared to the layout. (Start blender that uses curves in debug mode.)
  • Depth values are off, making the depth of field render incorrect.
  • Normals are off, resulting in errors in the Studio light
  • stencil shadows
This PR contains many smaller changes in order to get workbench working. This PR will be separated into smaller pieces and those will land. # TODO - [x] There is a mismatch when using texel buffers compared to the layout. (Start blender that uses curves in debug mode.) - [ ] Depth values are off, making the depth of field render incorrect. - [x] Normals are off, resulting in errors in the Studio light - [ ] stencil shadows
Jeroen Bakker added this to the 3.6 LTS milestone 2023-05-12 15:46:42 +02:00
Jeroen Bakker added the
Interest
Vulkan
label 2023-05-12 15:46:42 +02:00
Jeroen Bakker self-assigned this 2023-05-12 15:46:42 +02:00
Jeroen Bakker added 5 commits 2023-05-12 15:46:49 +02:00
ab725fddd4 Vulkan: IndexBuffer as Subrange
Add support for index buffers as subrange. When an index buffer
is a subrange it should bind the source buffer and use the index start
as an offset in the buffer.
3a4605a52a Vulkan: Disable Depth Bounds Test
Depth bounds test was always enabled, but should have be disabled.
With this change the outline of the default cube would become visible.
Jeroen Bakker added this to the EEVEE & Viewport project 2023-05-12 15:46:56 +02:00
Jeroen Bakker added 3 commits 2023-05-15 16:19:29 +02:00
Jeroen Bakker added 1 commit 2023-05-15 21:11:09 +02:00
Jeroen Bakker added 1 commit 2023-05-15 21:14:59 +02:00
Jeroen Bakker added 2 commits 2023-05-16 09:45:26 +02:00
Jeroen Bakker added 3 commits 2023-05-16 11:42:32 +02:00
Jeroen Bakker added 1 commit 2023-05-16 14:02:32 +02:00
Jeroen Bakker added 1 commit 2023-05-16 15:57:50 +02:00
Jeroen Bakker added 1 commit 2023-05-16 16:15:08 +02:00
Jeroen Bakker added 1 commit 2023-05-17 12:30:23 +02:00
Jeroen Bakker added 4 commits 2023-05-19 09:11:32 +02:00
Jeroen Bakker added 1 commit 2023-05-19 11:59:21 +02:00
Jeroen Bakker added 2 commits 2023-05-19 14:46:16 +02:00
Jeroen Bakker added 2 commits 2023-05-19 15:03:01 +02:00
Jeroen Bakker added 1 commit 2023-05-19 15:32:40 +02:00
Jeroen Bakker added 2 commits 2023-05-22 10:57:32 +02:00
Jeroen Bakker added 1 commit 2023-05-22 20:32:03 +02:00
Jeroen Bakker reviewed 2023-05-23 09:33:47 +02:00
@ -159,1 +161,4 @@
GCaps.shader_image_load_store_support = true;
/* Although not used or implemented, it is required to make sure that curve/hair drawing uses the
* right branch. This should be fixed in the draw manager. */
GCaps.transform_feedback_support = true;
Author
Member

Can be reverted

Can be reverted
Jeroen-Bakker marked this conversation as resolved
Jeroen Bakker added 1 commit 2023-05-23 14:32:51 +02:00
Jeroen Bakker added 2 commits 2023-05-23 15:48:28 +02:00
Jeroen Bakker added 3 commits 2023-05-25 12:01:40 +02:00
Jeroen Bakker added 1 commit 2023-05-25 15:48:39 +02:00
Jeroen Bakker added 1 commit 2023-05-25 16:47:15 +02:00
Jeroen Bakker added 1 commit 2023-05-25 17:34:26 +02:00
Jeroen Bakker added 1 commit 2023-05-26 08:39:44 +02:00
Jeroen Bakker modified the milestone from 3.6 LTS to 4.0 2023-05-26 08:59:11 +02:00
Jeroen Bakker added 1 commit 2023-05-30 09:20:28 +02:00
Jeroen Bakker added 1 commit 2023-05-30 11:38:15 +02:00
Jeroen Bakker added 1 commit 2023-05-30 13:59:29 +02:00
Jeroen Bakker added 1 commit 2023-05-30 15:56:58 +02:00
Jeroen Bakker added 1 commit 2023-05-30 16:11:42 +02:00
Jeroen Bakker added 1 commit 2023-06-01 13:34:29 +02:00
Jeroen Bakker added 1 commit 2023-06-01 13:41:25 +02:00
Jeroen Bakker added 1 commit 2023-06-01 14:08:31 +02:00
Jeroen Bakker added 1 commit 2023-06-01 15:35:27 +02:00
Jeroen Bakker added 1 commit 2023-06-02 09:32:11 +02:00
Jeroen Bakker added 3 commits 2023-06-02 15:44:24 +02:00
Jeroen Bakker added 1 commit 2023-06-02 16:01:51 +02:00
Jeroen Bakker added 1 commit 2023-06-04 09:00:18 +02:00
Jeroen Bakker added 17 commits 2023-06-05 11:20:29 +02:00
8771f92903 Cleanup: rename ParticleSettings.child_nbr to child_percent
The old name was only kept to avoid breaking compatibility.
eec118aa4d Fix Principled Hair Absorption Coefficient when using OSL
The additional SocktType::VECTOR argument was being interpreted as flags,
which caused the OSL compiler to skip the input (since the Vector type enum
happens to align with the INTERNAL flag), which caused the OSL shader to
always use the hardcoded default absorption regardless of what was entered.
d578ce1b6d UV: Add optimal uv packings using precomputed layouts
Produce optimal layouts for `n` squares, where n == 11, 18, 19 and 26.

With thanks:
* Walter Trump
* Pertti Hamalainen
* Robert Wainwright
* Erich Friedman
a44d153c6a Cycles: Remove MultiGGX code, replace with albedo scaling
While the multiscattering GGX code is cool and solves the darkening problem at higher roughnesses, it's also currently buggy, hard to maintain and often impractical to use due to the higher noise and render time.

In practice, though, having the exact correct directional distribution is not that important as long as the overall albedo is correct and we a) don't get the darkening effect and b) do get the saturation effect at higher roughnesses.

This can simply be achieved by adding a second lobe (https://blog.selfshadow.com/publications/s2017-shading-course/imageworks/s2017_pbs_imageworks_slides_v2.pdf) or scaling the single-scattering GGX lobe (https://blog.selfshadow.com/publications/turquin/ms_comp_final.pdf). Both approaches require the same precomputation and produce outputs of comparable quality, so I went for the simple albedo scaling since it's easier to implement and more efficient.

Overall, the results are pretty good: All scenarios that I tested (Glossy BSDF, Glass BSDF, Principled BSDF with metallic or transmissive = 1) pass the white furnace test (a material with pure-white color in front of a pure-white background should be indistinguishable from the background if it preserves energy), and the overall albedo for non-white materials matches that produced by the real multi-scattering code (with the expected saturation increase as the roughness increases).

In order to produce the precomputed tables, the PR also includes a utility that computes them. This is not built by default, since there's no reason for a user to run it (it only makes sense for documentation/reproducibility purposes and when making changes to the microfacet models).

Pull Request: #107958
bd2ee6b1c1 Cleanup: disambiguate the term 'path'
Use filepath or dirpath, unless the contents might be either,
in that case note that the contents could be both.
Use `rna_path*` in some cases too.
7eeca95502 PyAPI: rename filename to filepath for RNA API functions
- Depsgraph.debug_relations_graphviz
- Depsgraph.debug_stats_gnuplot
- RenderLayer.load_from_file
- RenderResult.load_from_file
- bpy.app.icons.new_triangles_from_file
75a93813e5 BLI_string: add BLI_strchr_or_end
Returning the pointer to the null byte when the character isn't found
is useful when handling null terminated strings that contain newlines.

This means the return value is never null and the line span always ends
at the resulting value.
60e0589f68 Cleanup: use BLI_strchr_or_end to simplify new-line stepping
- DRW_draw_region_engine_info:

  - Remove duplicate line drawing for the last line.
  - Remove string copying, pass the length to BLF_draw_default instead.
  - Resolve a potential buffer overflow as the source string length was
    used to define the destinations maximum size.

- CONSOLE_OT_paste:

  - Remove the need to null-terminate each line.
  - Buffer stepping uses const values
  - console_line_insert no longer strips the string it inserts.

- CONSOLE_OT_insert:

  - New lines in the middle of text now reports an error,
    new lines at the end of text is stripped (as before).
36eebb48b5 Metal: Silence Console Output
This PR silences console output during statup phase of blender. During
startup logging isn't yet initialized and print statements where used.
Logging is initialized during the first construction of a Metal Context.

The console prints are now hidden by behind the '--debug-gpu' command
line option.

Pull Request: #108593
Jeroen Bakker added 1 commit 2023-06-05 11:27:48 +02:00
Jeroen Bakker added 1 commit 2023-06-07 11:44:59 +02:00
Jeroen Bakker added 1 commit 2023-06-08 09:18:01 +02:00
Jeroen Bakker added 3 commits 2023-06-08 09:51:53 +02:00
Jeroen Bakker added 3 commits 2023-06-08 15:19:51 +02:00
Jeroen Bakker added 1 commit 2023-06-08 15:39:47 +02:00
Jeroen Bakker added 1 commit 2023-06-08 16:18:16 +02:00
Jeroen Bakker added 1 commit 2023-06-09 07:56:11 +02:00
Jeroen Bakker added 1 commit 2023-06-09 11:56:24 +02:00
Jeroen Bakker added 1 commit 2023-06-09 16:29:52 +02:00
Jeroen Bakker closed this pull request 2023-08-25 15:05:46 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107886
No description provided.