Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Stylized Anime Shader for UE5 (UE5 + Models)

A flexible, artist-focused shader for Unreal Engine 5. Includes the full master material, models, and Blender files. · By MeshBites

Only the skin textures are not showing up. Is there a way to fix this? I'd appreciate your help."

A topic by junetae92@gmail.com created 68 days ago Views: 89 Replies: 3
Viewing posts 1 to 2

Cel Shader Material Compilation Error & Missing Textures

1. Description

The material textures for the character and certain objects are not rendering properly in the viewport.A shader compilation error and multiple warnings regarding the material function are being generated.


2. Error Logs 

[SM6] (Function MF_CelShader_Skin)(Node TextureSampleParameter2D) Sampler type is Color, should be Masks for /Engine/MaterialTemplates/LayerBlends/T_DefaultMaskTexture.T_DefaultMaskTexture

Developer

Hi, thank you for the report.

I had a look at the error, and it references the engine texture /Engine/MaterialTemplates/LayerBlends/T_DefaultMaskTexture, which doesn't appear to be directly referenced anywhere in the project on my side in the current version (1.3.1). Because of that, I suspect the issue may be coming from a custom edit or an older asset.

Could you let me know which version of the project you're using? If it's an older version, it's possible this issue existed there, as I may have been using that setup, but I usually use my custom assets instead of referencing engine texture.

Could you also try the following?

  • Right-click T_DefaultMaskTexture and choose Reference Viewer.
  • Increase the Search Reference Depth to more than 1.
  • Check whether any project assets reference that texture.

    I'll compare it with my project, which should help narrow down where the reference is coming from.


Also, this type of error usually happens when T_DefaultMaskTexture is assigned to a texture parameter whose Sampler Type is set incorrectly. For example, if the material expects a Masks texture but the sampler is set to Color, Unreal will produce both the visual issue and the compilation error you're seeing.

Hi,

Thank you for your quick reply.

I'm using Unreal Engine 5.7.4, and I'm currently using Toon Shader version 1.3.1. I also tried a few other versions just in case, but the same issue occurred in all of them.

From what I can tell, the parent material (MM_CellShader_Standard) doesn't seem to have any problems. The issue only affects the face and body materials.

As you suggested, I increased the Search Reference Depth to 5 in the Reference Viewer and also checked the Sampler Type. It is already set to Masks.

If there is any additional information, logs, or screenshots that would help you identify the issue, please let me know. I'd be happy to provide them.

Thank you again for your help!



 

Developer

Hi,

I think I have an idea of what's happening, although I'm not sure how your engine ended up in this state.

In the Reference Viewer for T_DefaultMaskTexture, I noticed it is being referenced by DefaultTexture (the redirector, not the actual texture). Redirectors are commonly created when an asset is moved, so Unreal leaves a reference behind to preserve existing links, or when an asset is deleted and its references are redirected to another asset. My guess is that the engine's DefaultTexture was somehow deleted, moved, or replaced, and its references ended up pointing to T_DefaultMaskTexture, which isn't suitable for that texture slot.

In my project, only the skin materials on my model use a diffuse/base color texture, since they're the only materials with painted color. That would explain why only those materials are rendering incorrectly.

To confirm this, could you try unchecking the Use Diffuse switch in one of the affected material instances? I'm fairly confident the compilation error will disappear if that's the cause.

For reference, the engine's DefaultTexture should look like this:



I think it's worth restoring that texture to avoid any future issues. One thing you can try is verifying your Unreal Engine installation. In the Epic Games Launcher, click the arrow next to the Launch button for your engine version and choose Verify. This will check the integrity of the engine files and should restore the original DefaultTexture if it has been modified or replaced.