Fix T41783: Cycles baking ignores displacement

Create unique flag for output shaders with displacement data and use it
to calculate transformed normal. Implementation suggested by Brecht Van
Lommel.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D890
This commit is contained in:
Dalai Felinto
2014-11-11 18:21:56 -02:00
parent 2beb940365
commit 8c227adb8c
3 changed files with 14 additions and 7 deletions

View File

@@ -359,6 +359,8 @@ void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Sc
flag |= SD_VOLUME_MIS;
if(shader->volume_interpolation_method == VOLUME_INTERPOLATION_CUBIC)
flag |= SD_VOLUME_CUBIC;
if(shader->graph_bump)
flag |= SD_HAS_BUMP;
/* regular shader */
shader_flag[i++] = flag;