else:
samp_res.statements.append(Statement("filter", Token('NEAREST')))
+ if tex_node.extension=="REPEAT":
+ samp_res.statements.append(Statement("wrap", Token('REPEAT')))
+ elif tex_node.extension=="EXTEND":
+ samp_res.statements.append(Statement("wrap", Token('CLAMP_TO_EDGE')))
+ elif tex_node.extension=="CLIP":
+ samp_res.statements.append(Statement("wrap", Token('CLAMP_TO_BORDER')))
+ samp_res.statements.append(Statement("border_color", 0.0, 0.0, 0.0, 0.0))
+
return samp_res
def get_sampler_name(self, tex_node):
name_parts.append("mip")
if use_interpolation and tex_node.max_anisotropy>1:
name_parts.append("aniso{:g}x".format(tex_node.max_anisotropy))
+ if tex_node.extension!="REPEAT":
+ name_parts.append("clip" if tex_node.extension=="CLIP" else "clamp")
return "_".join(name_parts)+".samp"