Age | Commit message (Collapse) | Author |
|
|
|
Making them world space by default remove a lot of legacy conversion from
viewspace.
|
|
The end goal for this is to lower the number of needed matrices.
This also cleanup some uneeded transformation.
|
|
|
|
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
|
|
|
|
The wrong transformation was used. Add a new matrix specially for this case.
This also fix the Node texture coordinate that was suffering the same issue.
|
|
Until now, Orcos were computed by the gpu (GLSL) and were not taking into
account the modifier stack (breaking orco for deformed mesh).
Now Orco is now computed on CPU but only if a modifier stack is present.
Tagging that an ORCO layer is present is done via a 4th component, which is
a waste of memory/bandwidth. Best would be to do the same as auto attrib
color space and save a bool uniform somewhere but for now it's too
disruptive.
|
|
|
|
|
|
Was using the wrong vector length.
|
|
|
|
|
|
In this case, the generic vertex attribute is {0,0,0,1}. So we look for
this case.
This fixes black text objects with a normal map applied. Also this could
help porting sculpt mode drawing to Eevee without supporting normal
mapping.
Note that will just fix black meshes due to T61870 but objects will not
show their normal map. So it's not a fix for this issue.
|
|
This is a hacky fix. We just convert the int as a float and use it as such.
This works ok for small int but will not be correct for numbers greater
than 4194303.
Correct support would require deeper change for UBO creation and socket
conversion.
|
|
|
|
|
|
This commit possibly fixes the T58938.
The crash happens when a shader that is created in a rendering context is deleted and another shader with the same name/program of the deleted one is created in the same context and used in another context.
|
|
The geom shader check was not needed and this uncovered an error in the
GPU_BARYCENTRIC_TEXCO optimization recently commited.
|
|
This fixes the general case. It is still not supported for hairs.
Added a hack in the geometry node to avoid unnecessary geometry shader
usage.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
|
|
|
|
This is in order to make the API more multithread friendly inside the
draw manager.
GPU_shader_get_uniform will only serve to query the shader interface and
not do any GL call, making it threadsafe.
For now it only print a warning if the uniform was not queried before.
|
|
Also (mostly in comments): behaviour -> behavior (we use American English).
|
|
The Camera to Object space matrix was not implemented in gpu_codegen.
|
|
This was causing bad behavior of the node Normal.
|
|
Node group inputs should behave like cycles now.
----
We create dummy nodes that contains the default values for the nodegroup
inputs and link them to the sockets. This way the uniform buffer gathering
function can read them.
But we also need to disconnect all the internal links to sockets that have
hidden values. Theses sockets must not get the values from the nodegroup
input sockets if there is no link to them otherwise we get broken results
(i.e.: normals for a bsdf node).
|
|
Caveat: Random output does not yet work with instance (dupli) objects.
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
This implementation is a bit hacky but match cycles pretty close.
If pixel size is not enabled, it will use the geom shader to
compute distances between vertices. This will have a cost.
Implementation is a bit hacky in gpu_codegen to make the geom shader works
in an optional manner.
|
|
Not needed anymore since old one has been deleted.
|
|
|
|
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
|
|
|
|
This happens on NVidia GPUs, using more textures than the maximum allowed
by the gl will NOT trigger a linking issue (maybe because of bindless
texture implementation?).
So in this case we manually count the number of samplers per shader stage
and compare it against the GL limit. We discard the shader if the sampler
count is too high. This shows the user something is wrong with the shader.
|
|
Was done more like a hack on top of old drawing pipeline.
Should be re-implemented to fit new draw manager closer.
|
|
|
|
|
|
This supports meshes and hairs too. Matches cycles output.
This adds barycentric coords to the GPUBuiltin enum which will also be used
for the wireframe node.
|
|
keeping GPU_SHADER_SMOKE until other occurences are removed.
|