+ for(const BoundResource<SampledTexture> &t: texture_stack)
+ if(t.resource.texture && t.replaced<0)
+ {
+ if(t.binding<0 || shprog_changed)
+ t.binding = state.shprog->get_uniform_binding(t.tag);
+ if(t.binding>=0)
+ {
+ if(t.resource.sampler)
+ ps.set_texture(t.binding, t.resource.texture, t.resource.level, t.resource.sampler);
+ else
+ ps.set_storage_texture(t.binding, t.resource.texture);
+ }
+ }