You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a bind group with multiple textures like this:
@group(0) @binding(0)
var t_diffuse0: texture_2d<f32>;
@group(0) @binding(1)
var s_diffuse0: sampler;
@group(0) @binding(2)
var t_diffuse1: texture_2d<f32>;
@group(0) @binding(3)
var s_diffuse1: sampler;
Then I call set_bind_group to render something with this textures:
But the problem is this bind both textures simultaneously. What if I want to rebind one of them and keep the other? Can I rebind one texture separately? Or I need to create a separate bind group instance?
Why don't I use multiple bind groups? Unfortunately, I don't have such an opportunity, because I ran into a limit on the max number of binding groups (4), because in addition to the texture, I also use the camera, light, etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to create a bind group with multiple textures like this:
Then I call
set_bind_group
to render something with this textures:But the problem is this bind both textures simultaneously. What if I want to rebind one of them and keep the other? Can I rebind one texture separately? Or I need to create a separate bind group instance?
Why don't I use multiple bind groups? Unfortunately, I don't have such an opportunity, because I ran into a limit on the max number of binding groups (4), because in addition to the texture, I also use the camera, light, etc.
Beta Was this translation helpful? Give feedback.
All reactions