Fix Cycles bug rendering with multiple UV maps after recent changes.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 5 Mar 2019 17:39:55 +0000 (18:39 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 5 Mar 2019 17:39:55 +0000 (18:39 +0100)
intern/cycles/blender/blender_mesh.cpp
intern/cycles/render/nodes.cpp

index cb9d23e121c86827094c6e5ff709dc95b63f476d..46ecd60be77e59ad9ec013c4d56cb8cf5edf9af8 100644 (file)
@@ -489,7 +489,7 @@ static void attr_create_uv_map(Scene *scene,
                                }
                                else {
                                        uv_attr = mesh->attributes.add(uv_name,
-                                                                      TypeDesc::TypePoint,
+                                                                      TypeFloat2,
                                                                       ATTR_ELEMENT_CORNER);
                                }
 
@@ -586,7 +586,7 @@ static void attr_create_subd_uv_map(Scene *scene,
                                if(active_render)
                                        uv_attr = mesh->subd_attributes.add(uv_std, uv_name);
                                else
-                                       uv_attr = mesh->subd_attributes.add(uv_name, TypeDesc::TypePoint, ATTR_ELEMENT_CORNER);
+                                       uv_attr = mesh->subd_attributes.add(uv_name, TypeFloat2, ATTR_ELEMENT_CORNER);
 
                                if(subdivide_uvs) {
                                        uv_attr->flags |= ATTR_SUBDIVIDED;
index dc015b871e5da6cb77d311f7b5ef5838ecf8a53f..d32b1513e42402743fccccb430730685355bf860 100644 (file)
@@ -3483,7 +3483,7 @@ void TextureCoordinateNode::compile(SVMCompiler& compiler)
                }
                else {
                        int attr = compiler.attribute(ATTR_STD_UV);
-                       compiler.add_node(attr_node, attr, compiler.stack_assign(out), NODE_ATTR_FLOAT2);
+                       compiler.add_node(attr_node, attr, compiler.stack_assign(out), NODE_ATTR_FLOAT3);
                }
        }