SceneKit crashes on displacement map titling

The issue happens when using XCode 9.4 or XCode 10beta for developing iOS SceneKit app


I try to apply displacement map on an object surface. The app works fine without texture titling.

However, it doesn't work after I add a line to scale the mapping for texture titling purpose:


material.displacement.contentsTransform = SCNMatrix4MakeScale(scale, scale, 0)


In this case, the app crashes with error log:


validateFunctionArguments:3341: failed assertion `Vertex Function(commonprofile_vert): argument scn_commonprofile[0] from buffer(3) with offset(0) and length(480) has space for 480 bytes, but argument has a length(544).'


How can I use displacement map titling correctly?


Thanks

SceneKit crashes on displacement map titling
 
 
Q