diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-07 16:27:18 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-07 16:27:18 +0400 |
commit | 9fba458a7fe535e60f5c6beee9757fe25ffe2d49 (patch) | |
tree | e625eb73d3da32a01c84385e1976f81d2f8b92bd /source | |
parent | bdf731f03d727d3862537c59fa11477b77eb60b0 (diff) |
Cycles: float texture support. Due to GPU limitations there are now 95 byte,
and 5 float image textures. For CPU render this limit will be lifted later
on with image cache support. Patch by Mike Farnsworth.
Also changed color space option in image/environment texture node, to show
options Color and Non-Color Data, instead of sRGB and Linear, this is more
descriptive, and it was not really correct to equate Non-Color Data with
Linear.
Diffstat (limited to 'source')
4 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index f0d0a556d92..0d309aad36c 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -582,8 +582,8 @@ typedef struct TexNodeOutput { #define SHD_WAVE_TRI 2 /* image/environment texture */ -#define SHD_COLORSPACE_LINEAR 0 -#define SHD_COLORSPACE_SRGB 1 +#define SHD_COLORSPACE_NONE 0 +#define SHD_COLORSPACE_COLOR 1 /* blur node */ #define CMP_NODE_BLUR_ASPECT_NONE 0 diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 07d52f1a8ba..2caf1f06585 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1264,8 +1264,8 @@ static void def_sh_tex_sky(StructRNA *srna) static void def_sh_tex_environment(StructRNA *srna) { static const EnumPropertyItem prop_color_space_items[] = { - {SHD_COLORSPACE_SRGB, "SRGB", 0, "sRGB", "Image is in sRGB color space"}, - {SHD_COLORSPACE_LINEAR, "LINEAR", 0, "Linear", "Image is in scene linear color space"}, + {SHD_COLORSPACE_COLOR, "COLOR", 0, "Color", "Image contains color data, and will be converted to linear color for rendering"}, + {SHD_COLORSPACE_NONE, "NONE", 0, "Non-Color Data", "Image contains non-color data, for example a displacement or normal map, and will not be converted"}, {0, NULL, 0, NULL, NULL}}; PropertyRNA *prop; @@ -1289,8 +1289,8 @@ static void def_sh_tex_environment(StructRNA *srna) static void def_sh_tex_image(StructRNA *srna) { static const EnumPropertyItem prop_color_space_items[] = { - {SHD_COLORSPACE_LINEAR, "LINEAR", 0, "Linear", "Image is in scene linear color space"}, - {SHD_COLORSPACE_SRGB, "SRGB", 0, "sRGB", "Image is in sRGB color space"}, + {SHD_COLORSPACE_COLOR, "COLOR", 0, "Color", "Image contains color data, and will be converted to linear color for rendering"}, + {SHD_COLORSPACE_NONE, "NONE", 0, "Non-Color Data", "Image contains non-color data, for example a displacement or normal map, and will not be converted"}, {0, NULL, 0, NULL, NULL}}; PropertyRNA *prop; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c index dbdd6a8619b..d6957e53f10 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c @@ -44,7 +44,7 @@ static void node_shader_init_tex_environment(bNodeTree *UNUSED(ntree), bNode* no NodeTexEnvironment *tex = MEM_callocN(sizeof(NodeTexEnvironment), "NodeTexEnvironment"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); - tex->color_space = SHD_COLORSPACE_SRGB; + tex->color_space = SHD_COLORSPACE_COLOR; node->storage = tex; } diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c index aa679b4e04e..aa7ff279178 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c @@ -44,7 +44,7 @@ static void node_shader_init_tex_image(bNodeTree *UNUSED(ntree), bNode* node, bN NodeTexImage *tex = MEM_callocN(sizeof(NodeTexImage), "NodeTexImage"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); - tex->color_space = SHD_COLORSPACE_SRGB; + tex->color_space = SHD_COLORSPACE_COLOR; node->storage = tex; } |