Thanks Dan,
I didn't realize the different pixel formats, the MTKTextureLoader choosed, but there is something, I still don't understand:
A) This is the wanted result:
https://www.dropbox.com/s/fczgtktt43uk56h/A-RGB.png?dl=0
(achived with converting the grayscale image to rgb, then loading the rgb image and using my_texture_sample in the fragment shader)
B) This is the result when loading a grayscale image and using my_texture_sample in the fragment shader:
https://www.dropbox.com/s/2xa42xwkpbbxv2a/B-Gray.png?dl=0
C) But this is the result when loading a grayscale image and using my_texture_sample.xxxx in the fragment shader:
https://www.dropbox.com/s/9896xzurkqcwu2w/C-Gray%20xxxx.png?dl=0
Why is it too bright?
This is the rgb png:
https://www.dropbox.com/s/rr1r9b8kdgc1lp0/RGB%20version.png?dl=0
This is the grayscale png:
https://www.dropbox.com/s/29rvqwe7rnrbhol/Grayscale%20version.png?dl=0