diff --git a/librashader-reflect/src/reflect/presets.rs b/librashader-reflect/src/reflect/presets.rs index 644d8cb..1cbee0a 100644 --- a/librashader-reflect/src/reflect/presets.rs +++ b/librashader-reflect/src/reflect/presets.rs @@ -105,9 +105,11 @@ where }) .collect::)>, E>>()?; - for details in &passes { - insert_pass_semantics(&mut uniform_semantics, &mut texture_semantics, &details.0) + for (config, source, _) in &passes { + insert_pass_semantics(&mut uniform_semantics, &mut texture_semantics, config.alias.as_ref(), config.id as usize); + insert_pass_semantics(&mut uniform_semantics, &mut texture_semantics, source.name.as_ref(), config.id as usize); } + insert_lut_semantics(textures, &mut uniform_semantics, &mut texture_semantics); let semantics = ShaderSemantics { @@ -122,9 +124,10 @@ where fn insert_pass_semantics( uniform_semantics: &mut FastHashMap, texture_semantics: &mut FastHashMap>, - config: &ShaderPassConfig, + alias: Option<&ShortString>, + index: usize, ) { - let Some(alias) = &config.alias else { + let Some(alias) = alias else { return; }; @@ -133,8 +136,6 @@ fn insert_pass_semantics( return; } - let index = config.id as usize; - // PassOutput texture_semantics.insert( alias.clone(),