1 Reply
      Latest reply on Feb 8, 2020 8:09 AM by Prin_E
      Prin_E Level 1 Level 1 (0 points)

        I have encountered a problem sampling the array of depth2d like this code.


        fragment half4 shadow_preview_frag(pv_out v [[stage_in]], array<depth2d,2> shadowMap [[texture(0)]]) {
            half4 color = half4(1.0, 1.0, 1.0, 1.0);
            float depth = shadowMap[0].sample(s, v.uv);
            color = color * depth;
            color.a = 1.0;
            return color;


        The depth textures are shadow map. (depth-only pass) I use array of depth textures in the deferred lighting.

        When I run the application on Intel UHD Graphics 630, I get an weird color output.

        The black background appears, some kind of afterimages and noises appears on the rendered area.

        Intel HD Graphics 4000, Geforce GT 650M, Radeon Pro 5500M works very fine.


        Does anyone experience the similar problem? I tried to find the solution for few days but I couldn't figure it out :-(


        MacBook Pro 16 inch, Core i9 2.4GHz, Intel UHD Graphics 630/Radeon Pro 5500M, macOS 10.15.2, Xcode 11.3.1