- if len(channels)==4:
- fmt = 'SRGB8_ALPHA8' if colorspace=='sRGB' else 'RGBA8'
- elif len(channels)==1:
- fmt = 'LUMINANCE8' if channels[0]=='Y' else 'R8'
- else:
- fmt = 'SRGB8' if colorspace=='sRGB' else 'RGB8'
-
- tex_res.statements.append(Statement("storage", Token(fmt), image.size[0], image.size[1]))
+ tex_res.statements.append(Statement("storage", Token(texture.pixelformat), texture.width, texture.height))