In SceneKit, I want to apply a small texture on whole surface of an object, but the texture is stretched to cover, not piled as blocks. Like this
and this is what i want:
Then i find you can set uv channel's scale to 6 or bigger to make the texture piled together. As following:
Does framework supply some api to set the property in program ? I googled a lot and no lucks!
Yes, the corresponding API is on SCNMaterialProperty:
/*!
@property contentsTransform
@abstract Determines the receiver's contents transform. Animatable.
*/
@property(nonatomic) SCNMatrix4 contentsTransform;