Hello again
I've got a scenario where I need a simple grayscale image to be represented as an array or similar construct within my HLSL pixel shader code. Each pixel of the image should be mapped to a value within the code construct in question.
In the particular case I don't have the means to pass the image as texture to the shader and sample it from there, nor could I load it from anywhere. It needs to be present as a (const / static) variable or #define construct as part of the source code. I neither have access to the DirectX / D3D API functions so everything needs to be pure HLSL.
There are tools that help converting the image into HLSL code but I'm not sure about the best storage construct.
Would it be recommendable to use e.g. an array of unsigned integers with each entry representing a grayscale / color value, or are there better ways of doing such in terms of performance and memory usage?