keijiro / Skinner

Special Effects with Skinned Mesh in Unity
MIT License
3.36k stars 414 forks source link

render target error on tvOS #5

Closed rdouble closed 7 years ago

rdouble commented 7 years ago

I tried to build for tvOS, and get this error:

[MTLRenderPipelineDescriptorInternal validateWithDevice:], line 1659: error 'This set of render targets requires 48 bytes of pixel storage. This device supports 32 bytes.'

I was wondering if there is a way to get this to compile on tvOS, or if tvOS is unsupported.

keijiro commented 7 years ago

Are you trying to build the sample project included in this repository? I guess it doesn't work because of the PostProcessing stack -- it's using several high-bpp textures that are not available on mobile devices.

Instead of that, could you try to build the GlitchDancer project?

https://github.com/keijiro/GlitchDancer https://twitter.com/_kzr/status/816629769408102401

GlitchDancer is carefully tweaked for iOS, so that it can keep 60fps on recent iOS devices. I wonder if it can keep 60fps on tvOS... please let me know results if you can make it run on a tvOS device.

rdouble commented 7 years ago

I have tried GlitchDancer on tvOS too, and get the same error. GlitchDancer does work on my iPhone SE, though. The results from the Skinner demo are the same: works on iPhone, but not Apple TV.

I am trying to figure out if I just need to change a build setting or throw in a Metal shader flag or if the Apple TV has specific hardware limitations causing this problem. It's not high priority, I just wondered you knew of an obvious fix. I'll keep looking into it and let you know if I figure it out.

keijiro commented 7 years ago

Thanks for the information. I'm a bit surprised because there shouldn't be big differences between iOS and tvOS according to the capabilities list.

https://developer.apple.com/metal/capabilities/

I'll look into it later. I think I can borrow a device from somewhere...

keijiro commented 7 years ago

I realized that UNITY_TVOS should be added to this ifdef condition.

https://github.com/keijiro/Skinner/commit/5a9b46c2d8a3fcc4ddc5749b6d1b12cc48bc5900

I've updated both the Skinner package and GlitchDancer. They must run on tvOS devices now.

rdouble commented 7 years ago

thanks! it works now