GLTFKit icon indicating copy to clipboard operation
GLTFKit copied to clipboard

Lighting models on devices lower than A11

Open multybuq opened this issue 4 years ago • 2 comments

Hello!

I am using GLTFMTL framework in iOS application, is works great on iphone XS (A12 chip). GLTFMTLLightingEnvironment and GLTFKHRLight works with any combinations. But on iphone 7 and 6s (A10 chip and lower) lighting don't work and the model is absolutely black. I tried many models and situation is the same. The problem was on the lines _equirectToCubePipeline = [_device newComputePipelineStateWithFunction:equirectFunction error:error]; _irradiancePipeline = [_device newComputePipelineStateWithFunction:irradianceFunction error:error]; _specularPipeline = [_device newComputePipelineStateWithFunction:specularFunction error:error]; all the pipelines returned are nil.

The first suggestion is some parameter inside metal function is not compatible with a10 chip and lower. But I am not sure. Any suggestions?

multybuq avatar Dec 09 '19 11:12 multybuq

Looks like the problem is here:

  • Read or Write Cube Map Textures is available for metal family 4 (A11 and above). https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf

multybuq avatar Dec 09 '19 12:12 multybuq

@multybuq did you find a solution to A10 support here? We're trying desperately to find a robust glTF decoder for iOS

wvdk avatar Nov 24 '20 20:11 wvdk