Age | Commit message (Collapse) | Author |
|
|
|
Also get rid of clip_block which did the same as clipplanes inside
common_view_lib.glsl.
|
|
|
|
Remove the clear allocation flag as it has little impact since there should
be very few allocation per redraw.
Make BLI_memblock_alloc and BLI_memblock_iterstep much more cache efficient
removing them almost entirely from performance profiles.
|
|
|
|
|
|
This should be handled by DST.view_default
|
|
This will have multiple benefit.
TODO detail benefits (culling, more explicit, handling of clipping planes)
For now the view usage is wrapped to make changes needed more progressive.
|
|
- Remove DST.frontface and DST.backface.
- Separate uniform update into its own function draw_update_uniforms.
|
|
Adding a constant yields quadratic time complexity which can
have quite a big impact on some scenes.
I used the file from T64901 for testing.
In the test file, the time it took to execute `wm_draw_update`
changed from `0.60s` to `0.51s`.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4916
|
|
|
|
The problem has worsened in rB94db2c1f3243.
Maybe this has contributed to T64779.
|
|
The code currently doesn't run, needed for upgrading all selection
code to use the new API's.
|
|
|
|
|
|
The previous fix 8a6414ed46f66, resolved selection picking but didn't
work for box/circle/lasso select.
- Add ED_select_buffer_utils.h for general select-buffer operations
unrelated to edit-mesh.
- Circle select still needs to cache select-id's for each update.
|
|
This removes:
- DRW_STATE_TRANS_FEEDBACK
- DRW_STATE_WIRE
- DRW_STATE_POINT
|
|
This was the same as using the inverse obmat.
|
|
This is to simplify the usage of Volumetrics.
Now it automatically detect if there is any Volumetric material in the
view and allocate the needed buffer if any.
|
|
|
|
The GPUVertBuf was freed but not the GPUBatch.
Old bug exposed by new code from 8a6414ed46f66.
|
|
|
|
Was causing by garbage collection free the surf_per_mat_tris array.
The cache validate did not take care of ensuring the array was alloc again.
|
|
|
|
With this patch, the size of GPUVertFormat goes from 1240 to 388.
|
|
|
|
|
|
|
|
This is a big change that cleanup a lot of confusing code.
- The instancing/batching data buffer distribution in draw_instance_data.c.
- The selection & drawing code in draw_manager_exec.c
- Prety much every non-meshes object drawing (object_mode.c).
Most of the changes are just renaming but there still a chance a typo might
have sneek through.
The Batching/Instancing Shading groups are replace by DRWCallBuffers. This
is cleaner and conceptually more in line with what a DRWShadingGroup should
be.
There is still some little confusion in draw_common.c where some function
takes shgroup as input and some don't.
|
|
- Use int instead of uint for safety and less conversions.
- Add free callback
- Add cleared alloc option
|
|
This simplify the rendering logic.
|
|
|
|
|
|
This is in order to have VAO handled by thoses batches instead of using a
common VAO. Even if the VAO has no importance in these case using a batch
will help when transitioning to Vulkan.
|
|
|
|
Goal is still to simplify the draw manager.
|
|
|
|
This removes the need to pass the Material* all over the place in the draw
manager. Cleanup comming right after.
|
|
|
|
Cycles now uses the color space on the image datablock, and uses OpenColorIO
to convert to scene linear as needed. Byte images do not take extra memory,
they are compressed in scene linear + sRGB transfer function which in common
cases is a no-op.
Eevee and workbench were changed to work similar. Float images are stored as
scene linear. Byte images are compressed as scene linear + sRGB and stored in
a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read
as scene linear, simplifying the code and taking advantage of hardware support.
Further, OpenGL image textures are now all stored with premultiplied alpha.
Eevee texture sampling looks a little different now because interpolation
happens premultiplied and in scene linear space.
Overlays and grease pencil work in sRGB space so those now have an extra
conversion to sRGB after reading from image textures. This is not particularly
elegant but as long as engines use different conventions, one or the other
needs to do conversion.
This change breaks compatibility for cases where multiple image texture nodes
were using the same image with different color space node settings. However it
gives more predictable behavior for baking and texture painting if save, load
and image editing operations have a single color space to handle.
Differential Revision: https://developer.blender.org/D4807
|
|
PS: I hate my life
|
|
|
|
Also fix T64373 Grid intensity increases in Ortographic when use Circle
Select in GPencil Edit mode
|
|
|
|
|
|
This removes ModelViewProjectionMatrix usage
|
|
|
|
The DrawManager assumed that the first render layer was the render layer
where GP needed to render on. In viewport this is always the case as we
only have a single view layer. When rendering this can be multiple when
multiple layers are rendered and composited in the compositor.
In stead of the assumption that the first render layer is the render
layer we need to draw on, we search for the render layer with the same
name as the viewlayer.
Reviewed By: fclem, brecht, antoniov
Maniphest Tasks: T63099
Differential Revision: https://developer.blender.org/D4818
|
|
When using multiple viewlayers and switching between them the selection
gets buggy. The reason for this is that the select_id is updated based
on the index in the viewlayer. This makes the select_id not unique as
objects might be shared or not shared at all.
This fix will update the select_id on all objects in main. This will be triggered in all the selection operators.
Reviewed By: sergey, brecht
Maniphest Tasks: T55617
Differential Revision: https://developer.blender.org/D4824
|
|
|