Age | Commit message (Collapse) | Author |
|
This was because `stroke_id` was not using `vertex_start`.
But since `vertex_start` is not 1 based like it used to be, we need to add
1 to it to avoid a fragment depth of `0.0` which would be equal to the
background and not render.
|
|
Was caused by uvs not being sourced from the correct buffer.
|
|
This allows using instancing in other ways, like resources indexing.
|
|
This is part of the effor to simplify the View struct in order to implement
multiview rendering.
|
|
This is part of the effor to simplify the View struct in order to implement
multiview rendering.
|
|
|
|
This also removes the need to compute the persmat and saves some memory
from the `ViewInfos` struct. This is needed to allow multiview support.
Initial testing found no major performance regression during vertex
heavy workload.
Test file: {F13610017}
Results:
| Platform | Master | Split Matrix|
| Linux + Mesa + AMD W6600 | 48 fps | 47 fps |
| Macbook Pro M1 | 50 fps | 51 fps |
| Linux + NVidia 1080Ti | 51 fps | 52 fps |
| Linux + Radeon Vega 64 | 25.6 fps | 26.7 fps |
Increased precision when far from origin:
{F13610024}
{F13610025}
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D16125
|
|
|
|
This avoid some macro name clashing with other engines where this struct
is not needed.
|
|
On some hardware/systems, blender may crash when adding, rendering or displaying Grease Pencil objects.
In `/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl`, line 35:
```
gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag);
```
`gpMaterialFlag` is of type `uint`. This is a mismatched-type assignment that can cause crashes on some hardware/systems with GLSL that do not support implicit type casting.
So use `floatBitsToUint` for type conversion.
Differential Revision: https://developer.blender.org/D15433
|
|
depending on the visibility of other objects
The material ID was being wrongly passed in the shader.
|
|
|
|
MSL follows C++ standard convention, and such variable declarations within switch statements must have their scope localised within each case. Adding braces in all cases ensures correct behaviour and avoids 'case ... bypass initialization of local variable' compilation error.
struct initialisation to follow C++ rules for Metal. Implicit constructors replaced with either explicit constructors or list-initialization where appropriate.
Ref T96261
Authored by Apple: Michael Parkin-White
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14451
|
|
This was introduced by rBeccb0b222e3465baa71430223c5ee2f0206a7b02.
|
|
This is quite a huge cleanup. Making use of the `common_gpencil_lib.glsl`
to share more codes and use more consistent codestyle.
The gpencil engine specifics are now out of the `gpencil_vertex()`
function making it easier to add more features.
There should be no regression as all workarounds are kept as is.
|
|
Simple port. Shouldn't break anything.
|
|
Simple port. Shouldn't break anything.
|
|
Simple port. Shouldn't break anything.
|
|
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D14307
|
|
|
|
|
|
|
|
When using ``Path`` alignment, if the stroke has one point the texture rotates randomly when move the viewport. This was because with one point is impossible to calculate a path.
Now, if the stroke has only one point, the texture for this stroke is aligned to Object.
|
|
This patch adds a threshold value to the glow effect in color mode.
Currently, the threshold is hardcoded to 5%.
You can select a color and specify a higher threshold to include
similar colors in the effect.
Note: depends on D10670
Reviewed By: #grease_pencil, pepeland
Differential Revision: https://developer.blender.org/D10672
|
|
The shader was filtering everything but the selected color.
The fix inverts the check to make sure that color is selected.
Reviewed By: fclem
Maniphest Tasks: T86370
Differential Revision: https://developer.blender.org/D10670
|
|
The fill unclamped thickness value was not properly initialized for using with the new antialiasing.
The error was introduced in commit 09f7c9385829
|
|
|
|
To avoid anti-aliasing artifacts on GPencil strokes that have a size smaller than 1 the thickness
is clamped and the opacity reduced. This was done in vertex shader but this had the side effect
of causing strokes that go from large to small to fade across their lengths.
**Solution**
The opacity modulation has now been moved to the fragment shader as advised by Clément Foucault.
The strokeThickness that was passed to the shader was clamped to prevent it from being too small so an additional
unclamped thickness has been passed to the fragment to calculate the opacity modulation. Alternatively I could have chosen
strokeThickness and clampedThickness but I decided against renaming the variables in the current code.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D10438
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
The grease pencil merge depth shader is designed to only work correctly
in octographic mode. The uv coordinates used `noperspective` attribute.
Somehow this doesn't lead to render artifacts on most platforms and was
only detected on OSX + AMD cards.
This fix would calculate the uv coordinate inside the fragment shader
and isn't passed along from the vertex shader.
Thanks to Sebastián Barschkis for providing the hardware and time and
Clément Foucault for helping out with the final fix.
|
|
|
|
If the material has the holdout enabled, the value of the vertex color must not be used.
|
|
Add a parameter to rotate the texture for Dots and Squares
Differential Revision: https://developer.blender.org/D9369
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
This new feature allows to use the strokes as an eraser of any stroke below. This is very handy to open holes in filled areas.
After running some tests, we have decided to keep the additive effect of the holdout color. To get clean holdout areas, just move the color to black to remove any additive effect. To have additive effect can be used in situations like tint slightly a transparent window with blue to simulate the glass.
See T79878 for more details
Differential Revision: https://developer.blender.org/D8932
|
|
There is a driver bug that makes all the end of the structure unreadable.
Workaround this by just declaring a vec4 an unpacking manually.
|
|
|
|
This adds the opportunity to use it in multiple places.
|
|
|
|
|
|
|
|
The gpSceneDepthTexture is using a dummy 1px texture which was generating
wrong values for uvs when sampling gpMaskTexture.
Use the max size of both since any of the 2 can use dummy texture.
|
|
This was a logic error.
|
|
This was already the case in most parts of the GPU API.
Use full name for descriptive-comments.
|
|
Differential Revision: https://developer.blender.org/D7280
|
|
This was caused by an unitialized variable.
|
|
|
|
|
|
|
|
|