Commit Graph

7730 Commits

Author SHA1 Message Date
Jeroen Bakker
f0f911590e EEVEE-Next: Viewport pixel size with up-sampling
EEVEE-Next performes less on integrated GPUs then discrete GPUs.
Most shaders have been analyzed, but there will always be bottlenecks
related to architectural differences.

In order to make EEVEE-Next run smooth on integrated GPUs this change
will implement viewport pixel size option similar to Cycles. The main difference
is that the samples will still be weighted and up-sampled to the final film
resolution. This makes the pixels not look squared in the viewport but will
resolve to something close to the results without up-scaling.

This improves the performance especially on integrated GPUs. The improvement
for discrete GPUs are less noticeable. See here the stats when playing
`rain_restaurant.blend` back on a RAPHAEL_MENDOCINO iGPU.

| Pixel size | Frames per second |
|------------|-------------------|
| 1x         | 0.25 FPS          |
| 2x         | 4.14 FPS          |
| 4x         | 6.90 FPS          |
| 8x         | 9.95 FPS          |

Related to: #114597
See PR for some example images.

Pull Request: https://projects.blender.org/blender/blender/pulls/118903
2024-03-13 12:00:24 +01:00
Jacques Lucke
68c5e35be1 Merge branch 'blender-v4.1-release' 2024-03-12 17:33:59 +01:00
Jacques Lucke
ac8835f18b Fix #119350: shifting text overlay text
The issue was that the object location was taken into account twice using
`object_to_world` and `ob->loc`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119378
2024-03-12 17:32:52 +01:00
megakite
825e662229 Fix #119021: Crash when adding GP object
Added a null check for RE_GetRenderLayer() which could possibly return
null and then stored in `render_layer`, in order to prevent members of
`render_layer` being accessed in RE_pass_find_by_name(), and thus solved
the segmentation fault.

Pull Request: https://projects.blender.org/blender/blender/pulls/119200
2024-03-12 14:58:05 +01:00
Clément Foucault
a3d0145c93 GPU: Fix usage of char4 in opensubdiv shader
`char4` are defined as `int4` from now on. This
created a compiler error.
2024-03-12 12:46:52 +01:00
Hans Goudey
3c908dc7f5 Merge branch 'blender-v4.1-release' 2024-03-11 10:43:55 -04:00
Hans Goudey
8b9abd09c8 Fix #119270: Multires color attribute fallback drawing changed to black
Before e05c36f56d the fallback for unsupported attributes was
white. That's arbitrary, but not worth changing.
2024-03-11 10:41:38 -04:00
Miguel Pozo
a53e8d6d24 Merge branch 'blender-v4.1-release' 2024-03-11 12:27:39 +01:00
Miguel Pozo
23fd84ffbe Fix #118764: Freezing on Viewport Render Image during shader compilation
The shader compilation job assumes it can only be closed on program
exit, leaving all their materials as queued.
However, render tasks can kill it, causing drw_deferred_shader_add to
get stuck in an infinite loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/119172
2024-03-11 12:25:12 +01:00
Miguel Pozo
6aa50832cf Fix: EEVEE-Next: Workaround for Nvidia shader compiler
Using the previously computed L breaks shadows on reflection probes,
even if the value should be the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/119219
2024-03-11 12:23:07 +01:00
Clément Foucault
070d72b8f3 DRW: Fix debug_print using char4 macro
This is a side effect of the new small types
support. We need to avoid using them as local
variables.
2024-03-11 09:52:20 +01:00
Campbell Barton
e33f5e36ac Cleanup: spacing around C-style comment blocks 2024-03-09 23:40:57 +11:00
Campbell Barton
b1c59a793c Cleanup: correct spelling for alignment 2024-03-09 16:43:34 +11:00
Hans Goudey
04a9790035 Merge branch 'blender-v4.1-release' 2024-03-08 16:35:33 -05:00
Clément Foucault
4205718dce GPU: Cleanup type aliases
This define all aliases for supported types,
document which one to use in C++ shared code,
move relevant defines to their backend file.

Rename `bool1` to `bool32_t` and cleanup
its usage as mentioned in #118961.

Rel. #118961

Pull Request: https://projects.blender.org/blender/blender/pulls/119098
2024-03-08 19:09:10 +01:00
Jacques Lucke
1cca960677 Fix #103985: crash when using viewer node on curves with gpu subdivisions
The `cache.curves_cache.proc_attributes_buf[i]` is independent of the subdivision level.
Therefore it's not freed when the subdivision level changes currently. However, the
check assumed that when no attribute was changed, the final subdivided buffer is
non-zero, which is not true when the subdivision level changed.

Now directly check whether the attribute is cached already.

Pull Request: https://projects.blender.org/blender/blender/pulls/119216
2024-03-08 18:33:35 +01:00
megakite
8f120749dd Fix #119021: Crash when adding GP object
Added a null check for RE_GetRenderLayer() which could possibly return
null and then stored in `render_layer`, in order to prevent members of
`render_layer` being accessed in RE_pass_find_by_name(), and thus solved
the segmentation fault.

Pull Request: https://projects.blender.org/blender/blender/pulls/119200
2024-03-08 14:28:05 +01:00
Campbell Barton
f3e0e39df5 Cleanup: use const pointers where camera data isn't modified 2024-03-08 17:15:08 +11:00
Hans Goudey
744f3b2823 Cleanup: Grammar in comments: Fix uses of "own"
"Own" (the adjective) cannot be used on its own. It should be combined
with something like "its own", "our own",  "her own", or "the object's own".
It also isn't used separately to mean something like "separate".

Also, "its own" is correct instead of "it's own" which is a misues of the verb.
2024-03-07 16:23:35 -05:00
Hans Goudey
c8efea42e1 Cleanup: Remove unnecessary braces for container default constructors
These containers (Set, Vector, Map, Span), etc. have default constructors,
making the braces unnecessary for default initialization. Better to depend
on that consistently rather than having braces in some places and not others.
2024-03-07 09:30:23 -05:00
Hans Goudey
1e1d7034ec Cleanup: Move GPU_uniform_buffer.h to C++ 2024-03-06 21:54:28 -05:00
Campbell Barton
2d3a1aa238 Cleanup: spelling in comments 2024-03-07 13:29:18 +11:00
Miguel Pozo
1dd57369f2 Cleanup: EEVEE-Next: Remove unused parameter 2024-03-06 19:32:47 +01:00
Anthony Roberts
445fd42c61 Windows: Add ARM64 support
* Only works on machines with a Qualcomm Snapdragon 8cx Gen3 or above.
  Older generation devices are not and will not be supported due to
  some driver issues
* Requires VS2022 for building.
* Uses new MSVC preprocessor for sse2neon compatibility.
* SIMD is not enabled, waiting on conversion of blenlib to C++.

Ref #119126

Pull Request: https://projects.blender.org/blender/blender/pulls/117036
2024-03-06 16:14:34 +01:00
Miguel Pozo
500a891ac9 Fix: EEVEE-Next: Use the correct shadow radius
Typo/mistake from #118860.
2024-03-06 13:21:39 +01:00
Campbell Barton
aba193ad30 Cleanup: disable unused code 2024-03-06 14:43:15 +11:00
Miguel Pozo
bdba57e095 Fix: EEVEE-Next: PCF on perpendicular surfaces 2024-03-05 20:39:06 +01:00
Miguel Pozo
71ff93bb32 Fix: EEVEE-Next: PCF Overshadowing
Avoid overshadowing caused by shadow filtering.

Pull Request: https://projects.blender.org/blender/blender/pulls/118910
2024-03-05 20:02:47 +01:00
Miguel Pozo
c0f23e79e3 EEVEE-Next: More conservative shadow LOD selection
Ensure shadow-maps at non-zero LODs cover <1 screen texel.
This still doesn't solve projective aliasing, though.
2024-03-05 19:06:51 +01:00
Miguel Pozo
fe93664cef EEVEE-Next: Avoid shadowmap padding on 0 radius punctual lights
Use the original Light radius to compute the shadowmap projection.
Avoid unnecessary padding in shadowmaps, increasing the perceived
shadow resolution when the shadow softness is not 0.

Pull Request: https://projects.blender.org/blender/blender/pulls/118860
2024-03-05 18:59:44 +01:00
Hans Goudey
5993c517bd Cleanup: Use C++ Array, Span, int2 for lasso coords 2024-03-05 11:29:04 -05:00
Philipp Oeser
a58a2b0f5d Merge branch 'blender-v4.1-release' 2024-03-05 13:15:45 +01:00
Philipp Oeser
8c3b85d666 Fix #84848: Specific Rig Crashes blender when going into pose mode
The armature reported had two bones with a `bMotionPath` but its lengths
are zero (which causes trouble in `motion_path_cache` drawing code due
to 0 allocations).

Not exactly sure how we got there, something like
`animviz_verify_motionpaths` should take care of this already in current
code, but this might be from a time where there were not enough sanity
checks.

So now early out in `motion_path_cache` if we encounter such a
"corrupted" motion path.

Pull Request: https://projects.blender.org/blender/blender/pulls/119081
2024-03-05 13:15:18 +01:00
Campbell Barton
76867ad4c2 Cleanup: redundant "void" in function declarations for C++ 2024-03-05 11:25:35 +11:00
Miguel Pozo
fd459ae82c Fix #117977: EEVEE-Next: Broken shadows with 1GB pool size
shadow_page_unpack clamps the result to a valid page range, causing
all pages that shouldn't be rendered to render to the last valid page.

Pull Request: https://projects.blender.org/blender/blender/pulls/118979
2024-03-04 16:01:02 +01:00
laurynas
bf17fc8d79 Fix: GPU: Ensures length of curves GPUIndexBuf to be multiple of 4
Exception is thrown in gpu_storage_buffer.cc

To reproduce create legacy Bezier curve and convert it to new Curves.
Code is from #116617

Pull Request: https://projects.blender.org/blender/blender/pulls/118951
2024-03-03 16:39:11 +01:00
Miguel Pozo
2223130b16 Fix: EEVEE-Next: Shadow debug shader
Make the implementation functional again.

Pull Request: https://projects.blender.org/blender/blender/pulls/118923
2024-03-01 20:13:12 +01:00
Clément Foucault
90e86ead24 EEVEE-Next: Avoid same multiplication to the same constant 2024-02-29 19:19:10 +01:00
Miguel Pozo
3090a0a7f8 Fix: EEVEE-Next: Metal shader compilation
Metal doesn't support non-square matrices.

Pull Request: https://projects.blender.org/blender/blender/pulls/118912
2024-02-29 17:02:03 +01:00
Miguel Pozo
4083f8004d EEVEE-Next: Add Shadows PCF
Add percentage closer filtering to shadowmap sampling and a
`shadow_filter_radius` property to lights to control it.

Notes:
* This adds PCF to `eevee_shadow_tracing_lib`, but not to
  `eevee_shadow_lib`, which is used by volumes (not required) and
  thickness.
* PCF is computed based on the LOD0 size. This assumes that higher
  LODs are only used when the shadowmap resolution is actually good
  enough to match the render resolution.

Pull Request: https://projects.blender.org/blender/blender/pulls/118220
2024-02-29 15:47:16 +01:00
Miguel Pozo
5f838bd5c5 Fix: EEVEE-Next: Shadow tile update tagging
Tiles tagged for update in eevee_shadow_tag_update_comp can be
untagged in eevee_shadow_tilemap_init_comp, since those tiles
might be tagged as rendered.
Regression from 9e015f703c
2024-02-29 15:36:02 +01:00
Brecht Van Lommel
1355285c0e Merge branch 'blender-v4.1-release' 2024-02-29 13:52:19 +01:00
Jacques Lucke
4d13f56f63 Fix: cut off quaternion text overlay 2024-02-29 13:13:00 +01:00
Campbell Barton
6c78f79740 Cleanup: pass matrices by reference instead of value 2024-02-28 17:16:18 +11:00
Hans Goudey
d338261c55 Cleanup: Pass Span by value
Also pass Span instead of `const Array &`
and use parantheses for BLI includes.
2024-02-27 23:09:54 -05:00
Campbell Barton
7db790c4b7 Cleanup: spelling in comments 2024-02-28 12:13:20 +11:00
Hans Goudey
c3f1bacc80 Fix #118798: Weight paint overlay broken
The normal VBO is necessary but not requested after it was split
from the old pos_nor VBO from before bace4c9a29.
2024-02-27 14:42:12 -05:00
Jacques Lucke
086b808671 Merge branch 'blender-v4.1-release' 2024-02-27 20:40:29 +01:00
Jacques Lucke
c96e0a24bf Fix #116598: disable color overlay for rotation values
Currently, we don't support this. Depending on the geometry type, the rotations
are either displayed as black, magenta or there is a crash. Better disable this for
now until we have a proper implementation. It's not quite obvious how rotation
values should be converted to a color, so this also needs some design work.

Pull Request: https://projects.blender.org/blender/blender/pulls/118808
2024-02-27 20:30:01 +01:00
Miguel Pozo
edbf01d232 Merge branch 'blender-v4.1-release' 2024-02-27 20:23:35 +01:00