Cycles: Support texture coordinate from another object
This is the same as blender internal's texture mapping from another object, so this way it's possible to control texture space of one object by another. Quite straightforward change apart from the workaround for the stupidness of the dependency graph. Now shader has flag telling that it depends on object transform. This is the simplest way to know which shaders needs to be tagged for update when object changes. This might give some false-positive tags now but reducing them should not be priority for Cycles and rather be a priority to bring new dependency graph. Also GLSL preview does not support using other object for mapping. This is actually correct for BI shading as well and to be addressed as a part of general GLSL viewport improvements since it's not really clear how to support this in GLSL. Reviewers: brecht, juicyfruit Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1021
This commit is contained in:
@@ -357,8 +357,11 @@ public:
|
||||
SHADER_NODE_CLASS(TextureCoordinateNode)
|
||||
void attributes(Shader *shader, AttributeRequestSet *attributes);
|
||||
bool has_spatial_varying() { return true; }
|
||||
|
||||
bool has_object_dependency() { return use_transform; }
|
||||
|
||||
bool from_dupli;
|
||||
bool use_transform;
|
||||
Transform ob_tfm;
|
||||
};
|
||||
|
||||
class UVMapNode : public ShaderNode {
|
||||
|
Reference in New Issue
Block a user