Reputation: 22235
Within SCNShadable
it is straightforward to get the u_modelViewTransform
matrix, but how do you correctly get the current vertex position after transform?
float4 position = u_modelViewTransform * _geometry.position;
The error
program_source:443:19: error: use of undeclared identifier 'u_modelViewTransform' float4 position = u_modelViewTransform * _geometry.position;
I'm specifically, trying to get the plane equation of an SCNPlane
this way, so maybe this is the wrong way to go?
Upvotes: 0
Views: 295
Reputation: 13462
you should have access to _geometry.position
where _geometry
is of type SCNShaderGeometry
(the documentation for SCNShaderModifierEntryPointGeometry
)
Upvotes: 1