- depth_buf.set_min_filter(LINEAR);
- depth_buf.set_compare_enabled(true);
- depth_buf.set_compare_func(LEQUAL);
- depth_buf.set_wrap(CLAMP_TO_EDGE);
- depth_buf.storage(DEPTH_COMPONENT, size, size, 1);
+ Sampler &depth_samp = depth_buf.get_default_sampler();
+ depth_samp.set_min_filter(LINEAR);
+ depth_samp.set_compare(LEQUAL);
+ depth_samp.set_wrap(CLAMP_TO_EDGE);
+ depth_buf.storage(DEPTH_COMPONENT32F, size, size, 1);