Announcement

Collapse
No announcement yet.

Cannot find custon mesh material shader in shader map except opaque and not two sided

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cannot find custon mesh material shader in shader map except opaque and not two sided

    I implemented custom render pass and shaders. When I enter material editor and setting blend mode to masked or checking two sided crashes engine.

    Code:
    LogMaterial: Display: Missing cached shader map for material NewMaterial1, compiling.
    LogShaders: Display: Compiling NewMaterial1: Platform=PCD3D_SM5, Usage=LightingModel=MSM_DefaultLit, BlendMode=BLEND_Masked, SpecialEngine=0, TwoSided=0, TSNormal=1, Masked=1, Distorted=0, WritesEveryPixel=0, ModifiesMeshPosition=0, Usage={}
    ...
    LogMaterial: Error: Couldn't find Shader (FEdgeBaseVS, 0) for Material Resource NewMaterial1!
    RenderMeshShaderMap 1, RenderThreadShaderMap 1
    GameMeshShaderMap 1, GameThreadShaderMap 1, bShaderWasFoundInGameShaderMap 0
    With VF=FLocalVertexFactory, Platform=PCD3D_SM5
    ShouldCache: Mat=0, VF=1, Shader=1
    MaterialUsageDesc: LightingModel=MSM_DefaultLit, BlendMode=BLEND_Masked, SpecialEngine=0, TwoSided=0, TSNormal=1, Masked=1, Distorted=0, WritesEveryPixel=0, ModifiesMeshPosition=0, Usage={}
    But the weird part is, ShouldCompilePermutation() of my mesh material shader compiles for special engine, masked, modifying mesh position, two sided, opaque or masked materials.

    Code:
    static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters& Parameters)
    {
        return Parameters.MaterialParameters.bIsSpecialEngineMaterial
          || !IsTranslucentBlendMode(Parameters.MaterialParameters.BlendMode)
          || !Parameters.MaterialParameters.bWritesEveryPixel
          || Parameters.MaterialParameters.bIsTwoSided
          || Parameters.MaterialParameters.bMaterialMayModifyMeshPosition;
    }
    How can I fix this?

    #2
    Hi, Do you solve the problem? I met similar problem.

    Comment

    Working...
    X