IOS equivalent to tex2Dproj
1 answer
You just separate yourself.
Opengl
a = tex2Dproj( texture, texcoord.xyzw )
b = tex2Dproj( texture, texcoord.xyz )
Metal equivalent:
a = texture.sample( sampler, texcoord.xy/texcoord.w )
b = texture.sample( sampler, texcoord.xy/texcoord.z )
(Choose "a" or "b" depending on the type of projection you are doing, usually "a")
+2
source to share