scntranscaction

How to pass non-texture data to SCNTechnique Metal shaders

社会主义新天地 提交于 2019-12-11 07:32:56
问题 I can a pass custom parameter of type sampler2D to the Metal fragment function of an SCNTechnique and I have a working 2nd pass: PList: <key>inputs</key> <dict> <key>imageFromPass1</key> <string>COLOR</string> <key>myCustomImage</key> <string>myCustomImage_sym</string> </dict> ... <key>symbols</key> <dict> <key>myCustomImage_sym</key> <dict> <key>type</key> <string>sampler2D</string> </dict> </dict> Relevant Obj-C code: [technique setValue: UIImagePNGRepresentation(myCustomTexture) forKey:@