Just to clarify this a little: I'm not asking how you would accomplish the swizzle. I know many ways to accomplish the swizzle. I'm asking _why the default was 0,0,1 and not replicate_. This has nothing to do with the fact that you can set swizzles in samplers or anything else.
-
-
Show this thread
-
It seems like a case where the default was chosen poorly, and I wanted to know whether I'm wrong about that.
Show this thread -
It is at least true in OpenGL - textures by default do R,0,0,1 for mono, and there is no way to have them default to R,R,R,R. You _must_ create samplers (at least) if you want that to happen. And I just doubt that hardware generally prefers R,0,0,1 to R,R,R,R...
Show this thread
End of conversation
New conversation -
-
-
This Tweet is unavailable.
-
It was a texture load that replicated the mono texture across all channels. So if the texel value was I, then the apparent rgba on load would be (I,I,I,I). This is actually what I want always, whereas the now-standard RED model is for it to be (I,0,0,1) which is always useless.
- Show replies
-
-
-
I assume to continue the behaviour of: NULL (0,0,0,1) (legacy) 1-channel (R,0,0,1) 2-channel (R,G,0,1) (legacy) 3-channel (R,G,B,1) (legacy)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
That's what swizzle setting in the texture sampler is for. You are in total control which texture channel is loaded to every vector component, you just have to rebind descriptors to change that between draw calls. But you do that anyway when you change the texture.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
You can pick either - they're just different channel swizzle states. e.g. that's "Shader4ComponentMapping" in the SRV descriptor in D3D12, or VkComponentMapping in Vulkan. Go nuts.
-
Metal doesn't support component remapping for whatever reason though, so you'd have to do the swizzle in the shader :/
End of conversation
New conversation -
-
-
Luminance textures in GL2 worked that way IIRC. You can set swizzling in newer APIs.
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.