Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/nodes.cpp
| Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| ShaderOutput *alpha_out = output("Alpha"); | ShaderOutput *alpha_out = output("Alpha"); | ||||
| tex_mapping.compile(compiler); | tex_mapping.compile(compiler); | ||||
| image_manager = compiler.image_manager; | image_manager = compiler.image_manager; | ||||
| if(is_float == -1) { | if(is_float == -1) { | ||||
| if(builtin_data == NULL) { | if(builtin_data == NULL) { | ||||
| ImageManager::ImageDataType type; | ImageDataType type; | ||||
| type = image_manager->get_image_metadata(filename.string(), NULL, is_linear); | type = image_manager->get_image_metadata(filename.string(), NULL, is_linear); | ||||
| if(type == ImageManager::IMAGE_DATA_TYPE_FLOAT || type == ImageManager::IMAGE_DATA_TYPE_FLOAT4) | if(type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4) | ||||
| is_float = 1; | is_float = 1; | ||||
| } | } | ||||
| else { | else { | ||||
| bool is_float_bool; | bool is_float_bool; | ||||
| slot = image_manager->add_image(filename.string(), | slot = image_manager->add_image(filename.string(), | ||||
| builtin_data, | builtin_data, | ||||
| animated, | animated, | ||||
| 0, | 0, | ||||
| ▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | void EnvironmentTextureNode::compile(OSLCompiler& compiler) | ||||
| tex_mapping.compile(compiler); | tex_mapping.compile(compiler); | ||||
| /* See comments in ImageTextureNode::compile about support | /* See comments in ImageTextureNode::compile about support | ||||
| * of builtin images. | * of builtin images. | ||||
| */ | */ | ||||
| image_manager = compiler.image_manager; | image_manager = compiler.image_manager; | ||||
| if(is_float == -1) { | if(is_float == -1) { | ||||
| if(builtin_data == NULL) { | if(builtin_data == NULL) { | ||||
| ImageManager::ImageDataType type; | ImageDataType type; | ||||
| type = image_manager->get_image_metadata(filename.string(), NULL, is_linear); | type = image_manager->get_image_metadata(filename.string(), NULL, is_linear); | ||||
| if(type == ImageManager::IMAGE_DATA_TYPE_FLOAT || type == ImageManager::IMAGE_DATA_TYPE_FLOAT4) | if(type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4) | ||||
| is_float = 1; | is_float = 1; | ||||
| } | } | ||||
| else { | else { | ||||
| bool is_float_bool; | bool is_float_bool; | ||||
| slot = image_manager->add_image(filename.string(), | slot = image_manager->add_image(filename.string(), | ||||
| builtin_data, | builtin_data, | ||||
| animated, | animated, | ||||
| 0, | 0, | ||||
| ▲ Show 20 Lines • Show All 5,027 Lines • Show Last 20 Lines | |||||