Age | Commit message (Collapse) | Author |
|
|
|
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
|
|
Comment or remove unused defines.
|
|
|
|
Code comment notes there are "just a few",
now there are enough it's useful to include in GPUShaderStages.
|
|
Use names for declarations to support adding defines, coming next.
|
|
Only for workbench solid/wire modes.
|
|
|
|
This makes it possible to have some code specific to each shader inside a
shader library.
|
|
This is in order to avoid GL call during the "cache creation" phase and
support multithreading.
|
|
This is in order to make the API more multithread friendly inside the
draw manager.
GPU_shader_get_uniform will only serve to query the shader interface and
not do any GL call, making it threadsafe.
For now it only print a warning if the uniform was not queried before.
|
|
This removes code duplication and put an end to the old "create at request"
batch creation.
Also it uses the same vbo as the uv layer used for shading. Reducing VRAM
usage.
Also fixes the modified uv display in uv edit mode.
|
|
This is now done in shader so that the batches are shared across ImageUV
areas.
|
|
|
|
This is to separate id drawing from standard color drawing.
|
|
Textures are now hooked up to the RESET operation of particle
settings, which ensures particles being re-distributed when
texture is changed.
This is limited to a direct user modifications, which matches
old behavior in 2.79.
|
|
Some drivers accept shaders with only vertex stage, but some just silently
fails.
|
|
Instead of doing a lot of alpha blended drawing with jittering, use the
fragment shader to do the masking using a circle mask.
This is much simpler and requires much less resources.
Hopefully this may solve the issue we have with the Intels UHD Graphics 620
on linux.
|
|
|
|
Reviewers: fclem
Differential Revision: https://developer.blender.org/D3767
|
|
NOTE: This commit only concern edit UVs and not the "shadow" mesh displayed
when texture painting. This will be address in a future commit.
We now cache the uv mesh in the mesh batch cache and only reupload data on
changes.
Update could be more granular (and a bit faster) but it's not our main
concern ATM.
This should fix problem caused by the IMM api used to draw large meshes.
This makes performance skyrocket compared to previous implementation.
There is still a big CPU bottleneck when not in sync selection mode but it
is not related to the drawing function directly.
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
Use the multiply blending mode for the weight paint overlay.
To support the opacity slider, we need a new shader. Otherwise this combination of multiplication and mixing does not seem to be supported by glBlendFunc.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3727
|
|
The existing alternative is to use a buffer and call
uniform_vector_float which is overkill for such a simple operation.
|
|
|
|
Differential Revision: https://developer.blender.org/D3688
|
|
Was done more like a hack on top of old drawing pipeline.
Should be re-implemented to fit new draw manager closer.
|
|
|
|
|
|
Testing GLEW_ARB_texture_gather is not sufficient in this case. We need to
test if GL_ARB_texture_gather is defined in the shader, which is always true
on some NVIDIA drivers who does not support it...
So trying to make everything work.
|
|
|
|
It is was not really a bottleneck but it was triggering my OCD when 1/3rd
of the drawcalls in a normal scene were basically only caused by this.
|
|
keeping GPU_SHADER_SMOKE until other occurences are removed.
|
|
Note to myself, next time, better check the fix before pushing it.
GL_ARB_texture_gather is defined if there is support for the extension
not only when the extension is enabled. Do this check ourself with
GPU_ARB_texture_gather define.
Original fix 822de6e9e1b8
|
|
* Remove GPU_link_changed which is unused.
* Remove all GPU link function that are not used anymore.
* GPU_uniform_buffer is now GPU_uniform.
* GPU_texture_ramp is now GPU_color_band.
* GPU_uniform is now GPU_constant.
|
|
The extension GL_ARB_texture_gather is reported to be supported and does
not trigger an error when enabled but the textureGater functions are not
defined.
Workaround is to disable the use of this extension on such systems.
|
|
|
|
|
|
|
|
This commit merge the full development done in greasepencil-object branch and include mainly the following features.
- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.
You can get more info here:
https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/
This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.
Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
|
|
|
|
GPUFrameBuffers were being free when no context was attached or in the
wrong gl context. This make sure this does not happen again.
You can now safely free any gl resource from any thread (well as long as
it's not used anymore!).
|
|
|
|
|
|
Thanks to @sergey for review
|
|
|
|
|
|
|
|
This is really convenient for development. Either for profiling the
generated shaders or to check if the generated code is correct.
It writes the shaders to the temporary blender session folder.
(ported over from blender2.8)
|