Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Comment or remove unused defines.
|
|
|
|
Originally I wanted to avoid adding draw manager specific ifdef's all
over generic shaders however this isn't needed in so many places.
Also there are shaders that are only used by the draw manager so
duplicating them only to have the original unused doesn't make sense.
|
|
|
|
|
|
"The geometry shader uses varying _I;gl_PerVertex;gl_ClipDistance, but previous shader does not write to it."
|
|
|
|
|
|
Object selection now supports clipping.
|
|
DRW_shader_get_builtin_shader can replace GPU_shader_get_builtin_shader
when we need to support clipping.
Use this for loose point & wire drawing in object mode,
clips edges in lattice edit mode.
|
|
Avoid using pointer to pointer when building shader groups.
|
|
Each engine was doing this on its own.
Move to DRWContextState, use an enum.
|
|
Split out shader struct, no function changes.
|
|
|
|
|
|
We'll need to replace built-in shaders to add support for clipping.
|
|
Add 'G_draw' for all draw manager globals,
avoids adding extern to each file.
Connection between `ts` and `globals_ubo` wasn't obvious,
now called `G_draw.block` & `G_draw.block_ubo`.
|
|
|
|
Avoids messy conditional defines and inline lib allocation.
|
|
|
|
These only contain shaders, so name Shaders instead of ShaderData.
|
|
Caused:
error: unsized array index must be constant
Use hard coded number of clipping planes, copying the 4th to 5 & 6
when only 4 are used.
|
|
|
|
|
|
Removes need to pass the worldspace location.
|
|
Shaders are now stored in their own struct, no need for special names.
Also free as an array.
|
|
|
|
|
|
Instead of doing manual ray-plane intersection we use normalized positions
of the grid mesh and apply scaling after interpolation so that we keep
good precision even at really far distances.
Precision is now two order of magnitude better and does not produce the
same kind of artifact at lower clip start values.
This commit also cleanup the implementation.
Fixes T58918 Grid not appearing correctly at low clip start in 2.8
|
|
Matches `BASE_FROM_SET`.
|
|
Base outline is 2px wide (because of how we detect them).
And since inflating this outline will only produce outlines that are 2*x
thick we map the UI scalling and the outline width setting to the closest
match.
Do note that thicker outlines have a performance cost since they need more
texture fetches and passes.
This fixes T60252 3D View Outline Width not working
|
|
For clang-format not to wrap definitions.
|
|
The viewport stereoscopy support helpers are finally ported to 2.80.
We now can scale the camera and the "stereo cameras" will scale
in the viewport as well (unlike 2.7x).
At the moment I disabled the drawing of the camera frame when
stereo is selected and you are looking through the camera.
It is to be fixed later, but for now it draws the border wrong.
In 2.79 this was not a problem because the camera frame was drawn
afterwards as a hack.
Viewport > Stereoscopy:
* Cameras
* Convergence plane
* Convergence plane alpha
* Stereoscopy volume
* Stereoscopy volume alpha
|
|
shgroup_instance_alpha was getting a color[4] but would only use the
alpha defined upon creation of the shading group.
This was very limiting since it wouldn't allow for different instances
to have different alpha values.
Patch made with Clément Foucault (he made the code of it, while I fixed
all the parts of the code that were relying on shgroup_instance_alpha.
|
|
The overlay should now use the texture interpolation setting in material
mode.
In image mode, there is now a new button to let the user choose the texture
filter. The option is located in the Texture Slots popover and only shows
in Image mode.
|
|
|
|
Matches 2.7x behavior.
|
|
Was only working for loose wire.
|
|
Similar to 2.7x, so instanced geometry can be differentiated.
|
|
Similar to 2.7x, so instanced geometry can be differentiated.
|
|
|
|
Working in 2.7x, was just disabled in 2.8x.
Fixes T60256
|
|
|
|
Matches 2.7x behavior.
|
|
|
|
|
|
|