Cycles: Fix bump mapping to use object space when used with true displacement
Bump mapping was happening in world space while displacement happens in object space, causing shading errors when displacement type was used with bump mapping. To fix this the proper transforms are added to bump nodes. This is only done for automatic bump mapping however, to avoid visual changes from other uses of bump mapping. It would be nice to do this for all bump mapping to be consistent but that will have to wait till we can break compatibility. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2191
This commit is contained in:
@@ -1103,7 +1103,8 @@ void OSLCompiler::compile(Scene *scene, OSLGlobals *og, Shader *shader)
|
||||
shader->graph_bump->finalize(scene,
|
||||
true,
|
||||
true,
|
||||
shader->has_integrator_dependency);
|
||||
shader->has_integrator_dependency,
|
||||
shader->displacement_method == DISPLACE_BOTH);
|
||||
}
|
||||
|
||||
current_shader = shader;
|
||||
|
Reference in New Issue
Block a user