You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Reduce the number of samplers used by the scene shaders
The hard limit for Apple devices is 16 samplers per stage. So we need to ensure we use less than that
This commit is contained in:
@@ -2972,7 +2972,13 @@ void RenderForwardClustered::_update_render_base_uniform_set() {
|
||||
uniforms.push_back(u);
|
||||
}
|
||||
|
||||
uniforms.append_array(RendererRD::MaterialStorage::get_singleton()->samplers_rd_get_default().get_uniforms(14));
|
||||
{
|
||||
RD::Uniform u;
|
||||
u.binding = 14;
|
||||
u.uniform_type = RD::UNIFORM_TYPE_SAMPLER;
|
||||
u.append_id(RendererRD::MaterialStorage::get_singleton()->sampler_rd_get_default(RS::CanvasItemTextureFilter::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, RS::CanvasItemTextureRepeat::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED));
|
||||
uniforms.push_back(u);
|
||||
}
|
||||
|
||||
render_base_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, scene_shader.default_shader_rd, SCENE_UNIFORM_SET);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user