Age | Commit message (Collapse) | Author |
|
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
|
|
|
|
This patch adds a new Vertex Color node. The node also returns the alpha
of the vertex color layer as an output.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5767
|
|
This patch allows the Voronoi node to operate in 1D, 2D, and 4D space.
It also adds a Randomness input to control the randomness of the texture.
Additionally, it adds three new modes of operation:
- Smooth F1: A smooth version of F1 Voronoi with no discontinuities.
- Distance To Edge: Returns the distance to the edges of the cells.
- N-Sphere Radius: Returns the radius of the n-sphere inscribed in
the cells. In other words, it is half the distance between the
closest feature point and the feature point closest to it.
And it removes the following three modes of operation:
- F3.
- F4.
- Cracks.
The Distance metric is now called Euclidean, and it computes the actual
euclidean distance as opposed to the old method of computing the squared
euclidean distance.
This breaks backward compatibility in many ways, including the base case.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5743
|
|
This patch extends Musgrave noise to operate in 1D, 2D, 3D, and 4D
space. The Color output was also removed because it was identical
to the Fac output.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5566
|
|
Workarounds were not being enabled for drivers like `10.18.10.5069`.
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
Differential Revision: https://developer.blender.org/D5712
|
|
Fix issue in latest patch and assure derivatives calculation is correct on
all GPU.
|
|
Instead of fixed size, `IMM_BUFFER_SIZE` is adjustable now. The internal buffer can expand if there is a need a bigger buffer. All other behaviors are still the same.
Reviewed By: fclem, #gpu_viewport
Differential Revision: https://developer.blender.org/D5570
|
|
We basically duplicate the height map branch plugged into the bump node,
and tag each node in each branch as dx/dy/ref using `branch_tag`.
Then we add a one pixel offset on the texture coordinates if the node is
tagged as dx or dy.
The dx/dy branches are plugged into (new) hidden sockets on the bump node.
This match cycles bump better but have a performance impact. Also, complex
nodetrees can now become instruction limited and not compile anymore.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5531
|
|
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D5659
|
|
`noise_turbulence` was renamed to `fractal_noise`.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5691
|
|
This patch rewrites the Mapping node to support dynamic inputs. The
Max and Min options have been removed. They can be added as Min and
Max Vector Math nodes manually.
Texture nodes still use the old matrix-based mapping. A new SVM node
`NODE_TEXTURE_MAPPING` has been added to preserve this functionality.
Similarly, in GLSL, a `mapping_mat4` function has been added.
Reviewers: brecht, JacquesLucke
|
|
This patch extends perlin noise to operate in 1D, 2D, 3D, and 4D
space. The noise code has also been refactored to be more readable.
The Color output and distortion patterns changed, so this patch
breaks backward compatibility. This is due to the fact that we
now use random offsets as noise seeds, as opposed to swizzling
and constants offsets.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5560
|
|
Support for UV Stretching overlay during multi object editing. The
VBO now holds the ratios per fase. In the shader these ratios will
be compared against the global ratios. The global rations are created
from all selected objects.
The current implementation does not fit well with the draw module. The
plan is to move the drawing of other spaces towards the draw manager what
leads to a better fit. Currently the details on this solution is unclear
but this requirement will become an attentionpoint in the future design.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5665
|
|
This patch continue the efforts to split the `gpu_shader_material` file
started in D5569.
Dependency resolution is now recursive. Each shading node gets its own
file. Additionally, some utility files are added to be shared between
files, like `math_util`, `color_util`, and `hash`. Some files are always
included because they may be used in the execution function, like
`world_normals`.
Some glsl functions appeared to be unused, so they were removed, like
`output_node`, `bits_to_01`, and `exp_blender`. Other functions have
been renamed to be more general and get used as utils, like `texco_norm`
which became `vector_normalize`.
A lot of the opengl tests fails, but those same tests also fail in
master, so this is probably unrelated to this patch.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5616
|
|
|
|
With Blender 2.80 we introduced a more flexible matcap system. One
change we did was to multiply the matcap with the base color that was
shaded. As matcaps contains diffuse and specular lighting in a single
texture this lead to rendering artifacts. Artists were complaining that
everything looked to metalic.
We now support a separate `diffuse` and `specular` pass for matcaps.
`shaded_color = diffuse_light * base_color + specular_light`
For matcaps to support this feature they need to be multilayer openexr
files with 2 renderpasses (named `diffuse` and `specular`). In the future
we can change this to first pass/second pass in stead of this naming
convention.
Reviewed By: fclem, brecht
Differential Revision: https://developer.blender.org/D5335
|
|
This was a regression.
|
|
Compiling this big file for every Eevee material is bad for performance, and
now that we are adding more nodes it gets worse. This patch adds a simple
mechanism to split up that file, and use only the parts used by shader nodes.
When a function is used by GPU_link, we detect which GLSL file it came from
and use it in GLSL code generation automatically. Dependencies between GLSL
files are manually specified, and function names must be unique across all
GLSL files.
Most of the actual splitting up will be done in later commits.
Differential Revision: https://developer.blender.org/D5569
|
|
|
|
The object color property is added as an additional output in
the Object Info node.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5554
|
|
Previously there was already "draw_shape" property,
but it was doing nothing. This commit renames the
property to "display_shape". Furthermore, different
shapes like SQUARE and DIAMOND are supported now.
Currently, the shapes are drawn using the shader that also
draws keyframes. In the future we might want to separate
this.
The new shapes are not used anywhere yet, but they can
be used by addon developers and will probably be useful
when we want to support different kinds node systems later.
For example, different shapes can be used to distinguish
between data and control flow.
Differential Revision: https://developer.blender.org/D2829
|
|
|
|
The Volume Info node provides the Color, Desnity, Flame, and Temperature
of smoke domains.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5551
|
|
The White Noise node hashes the input and returns a random number in the
range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5550
|
|
Add Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap,
Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators
to the Vector Math node. The Value output has been removed from operators
whose output is a vector, and the other way around. All of those removals
has been handled properly in versioning code.
The patch doesn't include tests for the new operators. Tests will be added
in a later patch.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5523
|
|
Fix T68880 2D line display is broken
|
|
- Implement dynamic inputs. The second input is now unavailable in single
operand math operators.
- Reimplemenet the clamp option using graph expansion for Cycles.
- Clean up code and unify naming between Blender and Cycles.
- Remove unused code.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5481
|
|
|
|
Reviewed By: #gpu_viewport, fclem
Differential Revision: https://developer.blender.org/D5392
|
|
|
|
This reduces the risks of hash collision while maintaining a small number
of character per attrib.
|
|
This is done because they don't have the same update frequency. UV can be
persistent even on geometry update (ex: skinned object) but tangents
can change if the normals change.
Also the name buffer per vbo was too small to contain all names.
|
|
This remove code duplication and use base63 encoding of the hash.
Use mumur hash to have more randomness.
|
|
C99 style initializers are C++20 feature and should not be used.
Reported by @deadpin on chat.
|
|
For clarity sake, the batch cache now uses exclusively per Loop attributes.
While this is a bit of a waste of VRAM (for the few case where per vert
attribs are enough) it reduces the complexity and amount of overall VBO
to update in general situations.
This patch also makes the VertexBuffers filling multithreaded. This make
the update of dense meshes a bit faster. The main bottleneck is the
IndexBuffers update which cannot be multithreaded efficiently (have to
increment a counter and/or do a final sorting pass).
We introduce the concept of "extract" functions/step.
All extract functions are executed in one thread each and if possible,
using multiple thread for looping over all elements.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D5424
|
|
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
|
|
Previously, we had one global `GPU_matrix` stack, so the API was not
thread safe. This patch makes the stack be per `GPUContext`, effectively
making it local per thread (`GPUContext` is located in thread local
storage).
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5405
|
|
|
|
Support should be full when using Alpha Blend mode and partial if using
any other blend mode (opaque / alpha clip / alpha hashed).
|
|
Alpha blended Transparency is now using dual source blending making it
fully compatible with cycles Transparent BSDF.
Multiply and additive blend mode can be achieved using some nodes and are
going to be removed.
|
|
There was still some float imprecision when both input values are equal.
|
|
This patch adds a new node that clamps a value between a maximum and
a minimum values.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5476
|
|
This patch adds a new Map Range node that linearly remaps an input
value from a range to another. This node is similar to the compositor's
Map Range node.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5471
|
|
This was a precision error. Using a more robust approach
|
|
|