Age | Commit message (Collapse) | Author |
|
shader nodes (Blender Render)
Quite striaghtforward implementation, with the only weird thing that for some reason
my video driver wasn't happy with calling the function "clamp" giving some weirdo
shader compilation error messages.
Called the GPU function clamp_val which can handle float and vec3.
|
|
tangents are directions and should be transformed like directions.
|
|
|
|
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
|
|
|
|
The solution is to do the multiplication with the energy in the shader
after texture application.
We might be able to avoid setting dyncol completely, but this needs
better investigation. Some shader paths also look a bit redundant.
Also, texture mapping is not supported very well for light lamps, might
also need investigation.
|
|
|
|
Attempt to select closest bones when possible.
Occlusion query selection does't support this well because we can't
really derive depth information from occlusion tests. May be possible to
improve this somewhat in the future.
|
|
Bring back shading in texture painting.
This works now but it uses 3 texture units instead of two. Most GPUs of
DirectX 8 (OpenGL 1.4 should cover that) functionality even should have
those, but some old GPUs might not work with that. In any case, I hope
we will be moving to OpenGL 2.1 requirement soon anyway where 4-8
texture units are usually the norm.
|
|
|
|
|
|
Few things:
- reflect() takes arguments in this order: N, I, it was swapped
in the previous code for some reason.
- Normal and view vectors are to be normalized. For the view
vector we're now using shade_view() in order to deal with the
ortho camera. However, Cycles does not support ortho camera
for reflection, but this is easy to do in a separate commit.
- Reflection vector is to be in the world space. Kudos to
Antony Riakiotakis for figuring this out!
|
|
This was a little difficult to track down, basically it was a missing
escape sequence that only manifested itself when GPU did not support
bicubic filtering.
Extra:
* Fix memory leaks when an error occurs in shader compilation
* Display full shader when a compilation error occurs. Makes it easier
to diagnose if problem is caused by a syntax or compatibility error.
|
|
avoid software fallback.
|
|
|
|
Checked with Brecht, Cycles indeed expects generated to be in 0..1 space
instead of -1..1 as it is in BI.
|
|
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)
|
|
|