From e3461a02ac3617ee50a60601ed277b0cb65459ce Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 21 Jul 2015 22:09:52 +0200 Subject: Fix T43779: Cycles texture interpolation issues That was basically not an issue with interpolation, but rather missing wrapping options and periodic wrapping was always used. It's still a bit questionable why certain graphics cards were doing clamping in the file from the report, that's not something what is expected to happen from the settings of textures being passed to GPU. In any case this issue i still didn't manage to reproduce on any of the available GPUs, might be something related on driver glitch or so. In any case CPU now should behave just fine, rest of the issues we'll need to be able to reproduce first. --- source/blender/makesrna/intern/rna_nodetree.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1524715464f..7fc25f9f06a 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3557,7 +3557,7 @@ static void def_sh_tex_environment(StructRNA *srna) "Projection from an orthographic photo of a mirror ball"}, {0, NULL, 0, NULL, NULL} }; - + PropertyRNA *prop; prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); @@ -3624,6 +3624,12 @@ static void def_sh_tex_image(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; + static EnumPropertyItem prop_image_extension[] = { + {SHD_IMAGE_EXTENSION_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"}, + {SHD_IMAGE_EXTENSION_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"}, + {0, NULL, 0, NULL, NULL} + }; + PropertyRNA *prop; prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); @@ -3656,6 +3662,11 @@ static void def_sh_tex_image(StructRNA *srna) RNA_def_property_ui_text(prop, "Projection Blend", "For box projection, amount of blend to use between sides"); RNA_def_property_update(prop, 0, "rna_Node_update"); + prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, prop_image_extension); + RNA_def_property_ui_text(prop, "Extension", "How the image is extrapolated past its original bounds"); + RNA_def_property_update(prop, 0, "rna_Node_update"); + prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "iuser"); -- cgit v1.2.3