Replies: 3 comments 2 replies
-
It appears to me that you may want to use a dedicated
|
Beta Was this translation helpful? Give feedback.
-
Yeah, that is a workflow that would work for a lot of cases. If the data is already in a float4 though (such as coming from a texture), you can't do that. |
Beta Was this translation helpful? Give feedback.
-
Ah great, yeah that answers it then. Seems like it's covered enough by those two cases. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Stemming from an internal discussion we are currently having at my company. The data manipulated in shaders is often neither position/direction (xyzw) nor Color (rgba). So using those swizzles to access that data imparts incorrect information to the reader. One example is a vec2 holding something like (index, weight), and the code is accessing it via .xy.
Is there any interest/thoughts about adding an additional swizzle that is more appropriate for arbitrary data?
Beta Was this translation helpful? Give feedback.
All reactions