Commit Graph

562 Commits

Author SHA1 Message Date
f16bdf1075 Fix T61380 Geometry normal node incorrect for backfacing faces in Eevee 2019-03-12 22:02:39 +01:00
e1a62fa1a6 Fix T62259: RGB Curves behave differently in Cycles and Eevee
This was due to curve being not extrapolated correctly. Also curvemap range
was not taken into account.
2019-03-07 01:38:06 +01:00
Pablo Vazquez
8ca45e929a Wonky Menu Down Arrow
Almost every pulldown menu and popover has a little dropdown arrow shape.

Unfortunately it is a bit wonky.  The top of the right side of it is wider than the top of the left side. And both sides are narrower at the bottom than the top. It might be hard to see, but this image should help:

{F6728281}

The patch fixes the symmetry of the shape while keeping the weight as similar as possible. In the following image you can see the outline of the current version in red and this new version in green.

{F6728298}

With patch applied the arrow looks perfect:

{F6728302}

Reviewers: brecht, billreynish

Reviewed By: billreynish

Subscribers: pablovazquez

Tags: #bf_blender, #bf_blender_2.8, #user_interface

Differential Revision: https://developer.blender.org/D4424
2019-02-28 17:05:13 +01:00
c94b3b19a2 Fix T61373: Crash when selecting the edit mode
Some GPUs complain about `error C7011: implicit cast from "int" to "uint"` even if the cast is explicit.
2019-02-18 11:35:17 -03:00
9c49c2ef0c GPU: Change multisample resolve shader to output min depth
This will effectively make the AA passes thicker in some cases but it is
required for better AA on wireframes. The trick is to occlude the wire
passes so that they do not output fragment that could be behind actual
geometry.
2019-02-18 14:17:57 +01:00
253ff57617 Clamp value in sheen calculation to fix fireflies.
Fixes T59784.

Reviewers: fclem

Reviewed By: fclem

Subscribers: brecht

Maniphest Tasks: T59784

Differential Revision: https://developer.blender.org/D4269
2019-02-18 14:05:16 +01:00
7a41c1634b Merge branch 'blender2.7' 2019-02-14 20:00:37 +01:00
9886ae6331 Fix T61470: incorrect saturation clamping in recent bugfix.
We should clamp the result after multiplication.
2019-02-14 19:28:44 +01:00
dbd9b7590a Merge branch 'blender2.7' 2019-02-13 19:02:43 +01:00
ec559912fb Fix T61470: inconsistent HSV node results with saturation > 1.0.
Values outside the 0..1 range produce negative colors, so now clamp to that
range everywhere. Also fixes improper handling of hue > 2.0 in some places.
2019-02-13 17:06:30 +01:00
813800f143 DRW: support clipping for stick & wire bones 2019-02-08 23:21:22 +11:00
8996e26116 Fix T61196: Mesh select ignores clipping
Select clipping now works when x-ray is disabled.
2019-02-06 10:34:09 +11:00
dbd7f36da8 GPU: refactor clipped drawing from DRW into GPU
Needed to fix T61196, supporting clipped back-buffer in the 3D view
which is done outside the draw module.

It was also inconvenient having DRW_shader_* versions of GPU_shader_*
API calls.

- Clipping distances are now supported as a shader configuration
  for builtin shaders.
- Add shader config argument when accessing builtin shaders.
- Move GPU_shader_create_from_arrays() from DRW to GPU.
2019-02-06 09:15:16 +11:00
86193d25db Edit Mesh: Refactor Edit cage drawing to use old style drawing
This is work in progress. Look is not final.

This align data VBO data structure used for edti cage drawing to the one
use for normal drawing.

We no longer use barycentric coords to draw the lines an just rasterize
line primitives for edge drawing. This is a bit slower than using the
previous fast method but faster than the "correct" (edge artifact free)
method. This also make the code way simpler.

This also makes it possible to reuse possible and normal vbos used for
shading if the edit cage matches the

This also touches the UV batch code to share as much render data as
possible. The code also prepare for edit cage "modified" drawing cage (with
modifier applied) but is not enabled since selection and operators does not
work with modified cage yet.
2019-02-05 15:02:15 +01:00
851d58b34f DRW: support clipping for all lamp types 2019-01-29 20:27:28 +11:00
68cab3aff6 Cleanup: replace attrib w/ attr
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
2019-01-29 08:32:25 +11:00
9bc43223c1 DRW: support clipping for object & lamp centers 2019-01-29 00:27:43 +11:00
77b66a9666 DRW: support clipping for empty object 2019-01-26 15:49:14 +11:00
e72fa714a8 Cleanup: remove duplicated shaders that only added clipping checks
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.
2019-01-25 08:01:07 +11:00
6d8394d38b DRW: support clipping for camera objects 2019-01-25 07:13:02 +11:00
7faf0c8c2f Fix T59145: don't clamp color value in Hue Saturation Value node in eevee 2019-01-24 13:58:59 +01:00
48eed058b1 3D View: draw clipping region
Only for workbench solid/wire modes.
2019-01-23 23:37:25 +11:00
065bdc0333 GPUMaterial: Cleanup 2019-01-14 18:33:07 +01:00
Dalai Felinto
9f6e09bd8c Drawing API: shgroup_instance and shgroup_instance_alpha clarification
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.
2019-01-11 21:51:15 -02:00
1c91b6ee29 UVEdit: Port texpaint_loop_wire to batch request
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.
2019-01-11 16:00:23 +01:00
621a6d4a5d UVEdit: Add back uv angle stretch aspect correction
This is now done in shader so that the batches are shared across ImageUV
areas.
2019-01-11 16:00:23 +01:00
3bc87227f5 GPUMaterial: Cleanup / optimization 2019-01-11 16:00:23 +01:00
9d19ff9076 GPUShader: Add selection id shader
This is to separate id drawing from standard color drawing.
2019-01-11 16:00:23 +01:00
d55c269dd1 UI: Simplify the area border drawing
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.
2018-12-01 20:38:52 +01:00
65fa5a1926 Eevee: Optimize Color Ramp node for common cases. 2018-11-17 18:20:10 +01:00
c599aeaee5 GPU: Cleanup / Opti : Vectorize + MADD and remove unused function 2018-11-17 14:56:18 +01:00
d546269de8 Cleanup: Double semicolon at the end of line 2018-11-15 16:32:18 +01:00
4f11441913 Eevee: Add partial support for the Light Path Node
This makes it possible to tweak indirect lighting in the shader.

Only a subset of the outputs is supported and the ray depth has not exactly
the same meaning:

Is Camera : Supported.
Is Shadow : Supported.
Is Diffuse : Supported.
Is Glossy : Supported.
Is Singular : Not supported. Same as Is Glossy.
Is Reflection : Not supported. Same as Is Glossy.
Is Transmission : Not supported. Same as Is Glossy.
Ray Length : Not supported. Defaults to 1.0.
Ray Depth : Indicate the current bounce when baking the light cache.
Diffuse Depth : Same as Ray Depth but only when baking diffuse light.
Glossy Depth : Same as Ray Depth but only when baking specular light.
Transparent Depth : Not supported. Defaults to 0.
Transmission Depth : Not supported. Same as Glossy Depth.

Caveat: Is Glossy does not work with Screen Space Reflections but does work
with reflection planes (when used with SSR or not).
We have to render the world twice for that to work.
2018-11-08 19:20:40 +01:00
9d12a5aa9e Eevee: Fix geometry node for environments and support true_normal
Also minor cleanup for the Bump node.
2018-11-08 19:20:40 +01:00
bdd44564c9 GPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations 2018-11-07 22:16:13 +01:00
4f709152f4 Eevee: Add support for interpolation options for Environment Texture nodes 2018-11-07 22:16:13 +01:00
e0edac4cb2 Eevee: Support for extension type in the Node Image Texture
This does not work with the box projection mode. Implementing for box
projection mode would be difficult, slow, and produce a lot of code
duplication. Also i'm not sure this is worth it, as it's not a common use
case.
2018-11-07 22:16:13 +01:00
faecd16d31 Eevee: Fix volumetric broken after recent change 2018-11-07 13:25:28 +01:00
1fe561e662 Eevee: Wireframe: Increase precision a bit
Take the full derivative and compute its length instead of using fwidth.
2018-11-07 00:19:14 +01:00
c3a0af736a Eevee: Make Normal node interactive
Before it was triggering shader recompilation. Include small cleanup/opti.
2018-11-07 00:19:14 +01:00
d6908471c0 Eevee: Fix non normalized Normals in BSDFs and Layer Weight
Although the normal was normalized when evaluating the lighting, the normal
is often used for other purpose. In this case using the non normalized
normal maybe the source of errors.
2018-11-07 00:19:14 +01:00
c6c3d2e0f0 GPU: Cleanup: Vectorize operations and use MADD 2018-11-07 00:19:14 +01:00
8a204ccdb4 Eevee: Support monochromatic Transparent BSDF correctly
This fits Cycles better even if it is only for grey scale values. This only
work if the blend mode is Alpha Blend or Alpha Hashed.
2018-11-07 00:19:14 +01:00
a0dfa320cd Dope Sheet: new option to display keyframe interpolation mode and extremes.
With the new automatic handle algorithm, it is possible to do a lot
of the animation via keyframes without touching the curves. It is
however necessary to change the keyframe interpolation and handle
types in certain cases. Currently the dopesheet/action editor
allows changing the types, but does not show them in any way.

To fix, add a new menu option to display this information. For handle
type, it is represented using the shape of the key icons: diamond for
Free, clipped diamond for Aligned, square for Vector, circle for Auto
Clamp, and cirle with dot for Automatic.

Non-bezier interpolation is a property of intervals between keys,
so it is marked by drawing lines, similar to holds. In this initial
version, only the fact of non-bezier interpolation is displayed,
without distinguishing types. For summaries, the line is drawn at
half alpha if not all curves in the group are non-bezier.

In addition, it is sometimes helpful to know the general direction
of change of the curve, and which keys are extremes. This commit
also adds an option to highlight extremes, based on comparing the
keyed values with adjacent keys. Half-intensity display is used
for overshot bezier extremes, or non-uniform summaries.

Reviewers: brecht, aligorith, billreynish

Differential Revision: https://developer.blender.org/D3788
2018-10-29 22:04:19 +03:00
9d81e937d2 Optimizadion: Fix performanse issue of UI on some old GPUs.
Apparently the registry is not large enough and the compiler does something bad in indexing the array.
2018-10-22 12:59:09 -03:00
3e6b34dede Eevee: Fix default texture coord for procedural texture in world tree 2018-10-18 15:30:16 +02:00
6ef5bc1b99 Cleanup: node_tex_checker: Vectorize operation in GLSL 2018-10-18 15:30:16 +02:00
bb83bd773c Cleanup: Remove old smoke drawing code 2018-10-09 19:08:25 +02:00
f36f029321 Cleanup: style 2018-10-05 15:01:58 +10:00
a2d633316b Cleanup: Remove some unneeded code
Reviewers: fclem

Differential Revision: https://developer.blender.org/D3767
2018-10-04 18:54:08 +02:00