Age | Commit message (Collapse) | Author |
|
gpu_draw.c had generic sounding utility functions which were specific
to smoke drawing.
Split into it's own file so the functionality is clearly separated.
|
|
|
|
|
|
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming.
Reviewed By: sergey
Maniphest Tasks: T59995
Differential Revision: https://developer.blender.org/D3855
|
|
Previously this limit was rather high, but with UDIMs it's fairly easy
to reach this many images. Even though this exceeds the texture limit
on most hardware as far as I can tell, it should at least not crash.
The old code uses a fixed array which overflows eventually, this fix
replaces the array with a GSet.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D6416
|
|
|
|
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender.
With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser.
Therefore, code that is not yet aware of tiles will just access the default tile as usual.
The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9.
Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator.
The following features are supported so far:
- Automatic detection and loading of all tiles when opening the first tile (1001)
- Saving all tiles
- Adding and removing tiles
- Filling tiles with generated images
- Drawing all tiles in the Image Editor
- Viewing a tiled grid even if no image is selected
- Rendering tiled images in Eevee
- Rendering tiled images in Cycles (in SVM mode)
- Automatically skipping loading of unused tiles in Cycles
- 2D texture painting (also across tiles)
- 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders)
- Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID)
- Different resolutions between tiles
There still are some missing features that will be added later (see T72390):
- Workbench engine support
- Packing/Unpacking support
- Baking support
- Cycles OSL support
- many other Blender features that rely on images
Thanks to Brecht for the review and to all who tested the intermediate versions!
Differential Revision: https://developer.blender.org/D3509
|
|
Reusing math node functions for normal map node caused problems.
|
|
Previously Noise and Wave texture nodes would use noise functions within a [0,1]
range for distortion effects. We either add or subtract noise from coordinates,
never do both at same time. This led to the texture drastically shifting on the
diagonal axis of a plane / cube. This behavior makes the Distortion input hard
to control or animate. Capabilities of driving it with other texture are also
limited, diagonal shifting is very apparent.
This was fixed by offsetting the noise function to a signed range and making it
zero-centered. This way noise is uniformly added and subtracted from coordinates.
Texture pattern sticks to main coordinates which makes it way easier to control.
This change is not strictly backwards compatible, there is versioning to ensure
the scale of the distortion remains similar, but the particular pattern can be
a little different.
Differential Revision: https://developer.blender.org/D6177
|
|
Modes: Linear interpolation (default), stepped linear, smoothstep and smootherstep.
This also includes an additional option for the **Clamp node** to switch between **Min Max** (default) and **Range** mode.
This was needed to allow clamping when **To Max** is less than **To Min**.
Reviewed By: JacquesLucke, brecht
Differential Revision: https://developer.blender.org/D5827
|
|
When creating shaders and using maths functions it is expected that Blender should match functions in other DCC applications, game engines and shading languages such as GLSL and OSL.
This patch adds missing functions to the Blender maths node.
Ideally, it would be nice to have these functions available to vectors too but that is not part of this patch.
This patch adds the following functions trunc, snap, wrap, compare, pingpong, sign, radians, degrees, cosh, sinh, tanh, exp, smoothmin and inversesqrt.
Sign function is based on GLSL and OSL functions and returns zero when x == 0.
Differential Revision: https://developer.blender.org/D5957
|
|
This reverts commit cf77b67c459d481f6d8d34d13e14d22a6cad0842.
|
|
Differential Revision: https://developer.blender.org/D6351
|
|
The lines index buffer can contain all edges (edit mode) or only loose
edges (object mode). When switching between these modes the wrong
content of the index buffer can be used.
This patch will clear the lines index buffer when a `loose_edges` is requested. Making sure it is always up to date.
Note that this is supporting an exising hack where the IBO is truncated
during the creation. We should find a different way how to solve these
kind of issues.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D6349
|
|
This is the unification of all overlays into one overlay engine as described in T65347.
I went over all the code making it more future proof with less hacks and removing old / not relevent parts.
Goals / Acheivements:
- Remove internal shader usage (only drw shaders)
- Remove viewportSize and viewportSizeInv and put them in gloabl ubo
- Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader
- Remove old (legacy) shaders dependancy (not using view UBO).
- Less shader variation (less compilation time at first load and less patching needed for vulkan)
- removed some geom shaders when I could
- Remove static e_data (except shaders storage where it is OK)
- Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...)
- Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing).
- Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU).
- Post AA to avoid complexity and cost of MSAA.
Remaining issues:
- ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~
- FXAA is not the best for wires, maybe investigate SMAA
- Maybe do something more temporally stable for AA.
- ~~Paint overlays are not working with AA.~~
- ~~infront objects are difficult to select.~~
- ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~
Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6296
|
|
This is caused by the fallback path used by OSX, which is reconfiguring
the same default VAO. But it seems to be an issue on certain drivers.
|
|
BIF_gl.h included hacks like redefining glew functions and a constant.
The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h`
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5860
|
|
The Random Per Island attribute is a random float associated with each
connected component (island) of the mesh. It is particularly useful
when artists want to add variations to meshes composed of separate
units. Like tree leaves created using particle systems, wood planks
created using array modifiers, or abstract splines created using AN.
Reviewed By: Sergey Sharybin, Jacques Lucke
Differential Revision: https://developer.blender.org/D6154
|
|
Also correct some outdated symbol references,
add missing 'name' commands.
|
|
|
|
Caused by 4ddf3215a7df
|
|
Differential Revision: https://developer.blender.org/D6058
Reviewers: brecht, fclem
|
|
This could happen with the build modifier.
|
|
|
|
With this commit sculpt mode draws the real mesh wireframe instead of the
triangulated version by ignoring non real edges when building the PBVH GPU buffers
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6032
|
|
|
|
This is pretty conservative. We do not show warnings for e.g. HD 4000 with the
latest drivers as they appear to be working mostly fine even if unsupported,
and there is nothing the user can do to improve things.
Ref T70520
|
|
Avoid double multiplication by alpha on ssr/sss data.
|
|
Remove this entry for now until we have more carefully verified the list.
|
|
|
|
Adds a check when starting blender if your platform is supported. We use a blacklist
as drivers are updated more regular then blender (stable releases).
The mechanism detects if the support level changed or has been validated by the user previously.
Changes can happen due to users updating their drivers, but also when we change the support
level in our code base.
When the user has seen the limited support level message it is saved in the user config.
It would be better to have a system specific config section, but currently not clear
what could benefit from that.
When the platform is unsupported or has limited support a dialog box will appear including a link
to our user manual describing what to do.
**Windows**
Windows uses the MessageBox that is provided by the windows kernel.
**X11**
We use a very lowlevel messagebox for X11. It is very limited in use and can be fine tuned when needed.
**SDL/APPLE**
There is no implementation for SDL or APPLE at this moment as the platform support feature targets mostly Windows users.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5955
|
|
|
|
|
|
Made the code fully thread safe now.
|
|
This disable the indirect drawcall on all Nvidia hardware.
This has to be until nvidia fixes their drivers or instruct us
how to correctly fix the issue.
Related to T70011 Various display issues on NVIDIA
after draw call batching.
|
|
|
|
`context_local_shaders_workaround` is only supported on OpenGL 4.1 or higher.
|
|
|
|
This reverts commit 44d042094e21b519b38a3d78761b64bb5ceeb350 and adds a
simpler workaround for just the node links display issue. There are other
issues though so this is not a full workaround.
|
|
Ref T70295
|
|
This improves performance of some sculpt tools, particularly those that modify
many vertices like filter and mask tools, or use brushes with large radius.
For mask expand it can make updates up to 2x faster on heavy meshes, but for
most tools it's more on the order of 1-1.1x. There are bigger bottlenecks to
solve, like normal updates.
Ref T70295
Differential Revision: https://developer.blender.org/D5926
|
|
Related to T70011 and T70008
|
|
This was more of a general nvidia driver bug. Was caused by a
drawcall that had 0 vertex count. This worked in normal drawcalls
but not in indirect drawcalls.
|
|
This has been tested with 18.2.2, 19.0.8 and 19.3.0~develop.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5886
|
|
Apparently this workaround solves the problem.
|
|
|
|
|
|
This solution only reuses the performance workaround made for Intel.
But the original problem was not solved.
Not much we can do to solve it.
|
|
|
|
These asserts are too simple and triggers false positive.
|