Shader converter: gl_FragDepth and sampler arrays MoltenVK Support This topic contains 4 replies, has 2 voices, and was last updated by Bill Hollings 6 months ago. Viewing 5 posts - 1 through 5 (of 5 total) Author Posts June 28, 2017 at 9:55 am #1272 skalarproduktraumParticipant Hello MoltenVK team! First, huge thumbs up for your effort in bringing Vulkan to the Apple ecosystem! Second, I’m having two slight issues with my shaders, and I’m wondering whether these are issues with your shader converter, or whether I need to change something: 1. The shader converter does not seem to be aware of gl_FragDepth, <program source>:201:9: error: use of undeclared identifier 'gl_FragDepth' gl_FragDepth = Depth; 2. The shader converter also does not seem to be aware of sampler arrays: <program source>:51:33: error: type 'texture2d<float>' does not provide a subscript operator diffuse = ObjectTextures.sample(ObjectTexturesSmplr, in.VertexData_TexCoord).xyz; Looking forward to your advise 🙂 June 29, 2017 at 11:05 am #1273 Bill HollingsKeymaster @skalarproduktraum Thanks for identifying the issue with gl_FragDepth. It is indeed not behaving correctly. We have fixed this now…and it will appear in the next release of MoltenVK. Sampler arrays are new in Metal2 and support for them has not yet been added to MoltenVK. Please look for it later in the year. …Bill June 29, 2017 at 3:34 pm #1276 skalarproduktraumParticipant Hey Bill, thanks for the answer! I guess I’ll use separate samplers instead of an array then. Any ETA for both the next release and sampler arrays? July 3, 2017 at 2:26 pm #1277 skalarproduktraumParticipant Actually, wouldn’t it be easier to convert sampler arrays to a series of single samplers? That’d probably also work then on non-Metal2 OSX’s. July 17, 2017 at 11:02 pm #1288 Bill HollingsKeymaster @skalarproduktraum Support for gl_FragDepth is now available. Thanks for your suggestion about breaking a sampler array into individual components. We’ll look into that for backward compatibility when we implement the feature. There might be issues with shader conversion from SPIR-V though. …Bill Author Posts Viewing 5 posts - 1 through 5 (of 5 total) You must be logged in to reply to this topic.