Skip to content

Commit

Permalink
Apply alpha stripping to processed emissive skin
Browse files Browse the repository at this point in the history
  • Loading branch information
NickAcPT committed Aug 7, 2024
1 parent e621000 commit e621000
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nmsr-aas/src/routes/render_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ async fn load_textures<'a>(
for (&texture_type, texture_bytes) in &resolved.textures {
let mut image_buffer = load_image(texture_bytes)?;

if texture_type == ResolvedRenderEntryTextureType::Skin {
let is_skin_texture = texture_type == ResolvedRenderEntryTextureType::Skin;

#[cfg(feature = "ears")]
let is_skin_texture = is_skin_texture || texture_type == ResolvedRenderEntryTextureType::Ears(crate::model::resolver::ResolvedRenderEntryEarsTextureType::EmissiveProcessedSkin);

if is_skin_texture {
image_buffer = NMSRState::process_skin(image_buffer, request.features)?;
}

Expand Down

0 comments on commit e621000

Please sign in to comment.