Is there an explanation somewhere about the decision to use RED (R,0,0,1) instead of INTENSITY (I,I,I,I) behavior for single-channel textures in GPU programming? It seems like the universally wrong method to standardize, but maybe I'm missing something?
It would be fine if they'd kept INTENSITY as an option, but they removed it and you only get RED now, and I just cannot fathom why they would do that...
-
-
Fortunately, it's possible to emulate INTENSITY by using the texture swizzle functionality in the sampler. That's what I use when I want my shader to be agnostic about whether the texture is RGBA or INTENSITY.
-
Well I'm assuming Casey wants to be able to use the same shader with an RGB texture and then when you bind a single-channel it does the thing you'd expect, i.e. replicate. Thing is, a lot of hardware/drivers need to recompile that internally. So it's more "honest" to expose that.
- Show replies
New conversation -
-
-
In DX12 you can specify a swizzle when you create your SRV, which allows the shader to see an R texture as e.g. (R, R, R, 1) or whatever you choose. Vulkan has something similar too.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.