Age | Commit message (Collapse) | Author |
|
Soft light and Linear light blend modes weren't implemented in glsl
Reviewers: psy-fi
Maniphest Tasks: T41456
Differential Revision: https://developer.blender.org/D744
|
|
|
|
|
|
There were a few issues to fix here:
* We did not really unpremultiply float image dabs prior to sending them
to the GPU. That made float and byte image result different in texture
painting and undoing could change the result.
* To make textures nicely composited over the mesh, I used decal mode in
OpenGL texture environment for the texture unit. This uses the texture's
alpha channel with a nice over operator.
* Texture creation used to override the alpha setting due to the display
restrictions. Not so anymore, people can now create transparent byte
images.
Also, made alpha zero default for new textures now, since it has such a
nice effect here.
|
|
16 bit float textures was off
|
|
Some nodes could end up without any faces and in that case getting a
face material would fail.
|
|
|
|
This patch creates an interface for selection mechanisms in opengl. This
makes it possible to switch between occlusion query based or select
rendermode based selection transparently.
This is really useful on graphics drivers that do not accelerate the
select rendermode path (some ATI cards are notorious for this, and the
new path is used by default there), since occlusion queries are always
hardware accelerated due to their use in games.
The option can be found under system - selection. Auto just enables
occlusion queries for ATI users while the rest of the options enforce
one of the two methods always.
There is just one known change, previous code enforced nearest bone to
always get selected, even when mouse selecting near the same position, I
couldn't replicate the behaviour though.
patch by me with edits and review by Campbell.
Thanks!
|
|
Yep, at last it's here!
There are a few minor issues remaining but development can go on in
master after discussion at blender institute.
For full list of features see:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting
Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
|
|
|
|
|
|
ATIs.
This is actually a test to see if this can be enabled on ATI cards.
According to various sources, newer ATI cards supporting GLSL 3.0
support gl_ClippingDistance in shaders, which is the forward compatible
way to do custom clipping.
This fix will bind 6 additional varying variables on ATIs, which may
lead to some shaders not compiling due to limiting out of those
variables, or to performance degradation. Also I do not have an ATI
handy to test.
Having those in mind, this commit may well be reverted later.
Clipping planes are usually 4 (6 is for cube clipping), but making
shaders depend on viewport state is really bad, and would lead to
recompilation, so I took the worst case here to avoid that.
Hopefully driver does some optimization there.
|
|
Clipping border causes a software fallback on ATIs. We have disabled it
in that case but from minor digging on the net seems like Intels support
this, so enable.
|
|
|
|
|
|
|
|
|
|
Issue here is most likely sampler uniforms and textures not being
updated properly when zero binding is created. Solution for now is to
allow zero binding but when this happens use sexy pink invalid texture
instead :p.
|
|
|
|
To prevent only shadow lamps from producing negative colors, shr->diff
and shr->spec should've been clamped to positive values after lamp loop.
|
|
Using layer visibility in active render layer makes more accurate
preview but can cause problems in some cases:
https://developer.blender.org/rB1973b17fce65a4dfececb45b19abec37898c1ab5#comment-1
GLSL lamps now ignore layer visibility if lock_camera_and_layers is
OFF or game engine is running. The material lamp group still works
unconditionally though.
|
|
when changed in-game via Python
GPULamp::winmat needs to be updated after the spot size has changed.
|
|
|
|
Check for freeing old images was running per-object, move this to viewport drawing.
|
|
Reviewed By: dingto, brecht
Differential Revision: https://developer.blender.org/D507
|
|
Set hidden when rebuilding the PBVH tree if all primitives are hidden.
|
|
Avoid filling up buffers when total buffer triangles are zero.
Better still would be to tag a node as hidden when doing recreation of
the PBVH tree by checking for any visible elements. Original bug report
probably has to do with OpenGL doing something funky but hidden nodes
should be tagged as hidden to completely avoid iterating for painting.
This is to be done in a later commit.
Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to
GPU_build_mesh_pbvh_buffers.
|
|
To enable enter debug value 14.
Leaf nodes are green while container nodes are red.
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
The formula was not consistent across Blender and behaved strangely, now it is
a simple linear blend between color1 and min(color1, color2).
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D489
|
|
and material light group.
This change makes lighting in GLSL preview more accurate, though it still
doesn't support material's "Exclusive" option.
Technical note: Changes in view3d_draw.c are not essential, these avoid
preparing unused shadow buffers.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D457
|
|
|
|
modifiers, nodes)
|
|
|
|
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
|
|
|
|
Mostly monkey coding in gpu ("modern" VBO drawing) and DM variants ("legacy" drawing) code...
Reviewers: brecht
Reviewed By: brecht
CC: campbellbarton
Differential Revision: https://developer.blender.org/D367
|
|
|
|
and done at PBVH update time, since it is possible to have no triangles
to display in a buffer if node is hidden.
|
|
|
|
While hiding, flush the hidden flags to the faces. This avoids iterating
through all the loops while updating the GPU buffers.
|
|
|
|
|
|
|
|
The variables are considered invalid unless DM_update_materials is
called prior to use. Only use case currently is
mesh drawing. This helps with excessive allocation on the stack during
GPUObject creation, but may help elsewhere in the future as well.
|
|
|
|
|
|
Instead of setting color every time, just set it on material enable.
Handles all cases of surfaces. Thanks to Campbell for pointing out!
|
|
refresh all its nodes if show diffuse was on.
|
|
Issue here is that "show diffuse" option does not respect its intended
purpose which is to be used only for masking.
There are a couple of caveats here:
Dyntopo and multires -always- have mask data enabled, and thus as soon
as one goes to dyntopo mode or adds a multires modifier he would get the
default grey color instead.
Matcaps would break when nodes asked for a diffuse material color (this
was broken before too). Solved by adding global material state for when
matcaps are enabled. Also matcaps don't always played well with VBOs
off.
Added a few more missing updates for mask operators to notify
show_diffuse property as changed. This was also needed on rebuilding
dyntopo pbvh.
Also make zero mask color duller again after artist feedback.
|