Fix #33177: OSL render difference with missing textures and HSV nodes.

This commit is contained in:
Brecht Van Lommel
2012-11-20 17:40:21 +00:00
parent ab1b5af08d
commit fd619cd7f1
6 changed files with 102 additions and 26 deletions

View File

@@ -88,6 +88,7 @@ void OSLShaderManager::device_update(Device *device, DeviceScene *dscene, Scene
/* setup shader engine */
og->ss = ss;
og->ts = ts;
og->services = services;
int background_id = scene->shader_manager->get_shader_id(scene->default_background);
og->background_state = og->surface_state[background_id & SHADER_MASK];
@@ -118,6 +119,7 @@ void OSLShaderManager::device_free(Device *device, DeviceScene *dscene)
/* clear shader engine */
og->use = false;
og->ss = NULL;
og->ts = NULL;
og->surface_state.clear();
og->volume_state.clear();
@@ -334,7 +336,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderOutput *output)
while((i = sname.find(" ")) != string::npos)
sname.replace(i, 1, "");
/* if output exists with the same name, add "In" suffix */
/* if input exists with the same name, add "Out" suffix */
foreach(ShaderInput *input, node->inputs) {
if (strcmp(input->name, output->name)==0) {
sname += "Out";