# Shader error while using MMDLoader

**URL:** <https://discourse.threejs.org/t/shader-error-while-using-mmdloader/78353>\
**Category:** Questions\
**Tags:** loaders, materials, mmd, shaders\
**Created:** [February 19, 2025, 5:02pm UTC](https://discourse.threejs.org/t/shader-error-while-using-mmdloader/78353 "2025-02-19T17:02:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aadric37](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/aadric37/32/56953_2.png) [@Aadric37](https://discourse.threejs.org/u/Aadric37)\
**Post date:** [February 19, 2025, 5:02pm UTC](https://discourse.threejs.org/t/shader-error-while-using-mmdloader/78353/1 "2025-02-19T17:02:48Z")

</div>

![Screenshot 2025-02-19 at 10.31.12 PM](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/d/6d19a32610b91c9372d79432585066993667acf9.png)

Using r171

Program Info Log: Vertex shader is not compiled.

```javascript
  app.mmdLoader.load(
    modelURL,
    (object) => {
      app.currentMesh = object;
      app.scene.add(app.currentMesh);
    },
    (xhr) => {
      console.log((xhr.loaded / xhr.total) * 100 + "% loaded");
    },
    (error) => {
      console.error("Error loading PMX:", error);
    },
  );

```

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [February 19, 2025, 7:21pm UTC](https://discourse.threejs.org/t/shader-error-while-using-mmdloader/78353/2 "2025-02-19T19:21:43Z")

</div>

Are you trying to load your own MMD model?

At a glance, it looks like the model you are loading doesn’t have any morph targets. 🙂

But perhaps you are trying to use MMDLoader with a version of THREEJS that it wasn’t built against?

---

<div class="post-metadata">

**Author:** ![Aadric37](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/aadric37/32/56953_2.png) [@Aadric37](https://discourse.threejs.org/u/Aadric37)\
**Post date:** [February 20, 2025, 6:30am UTC](https://discourse.threejs.org/t/shader-error-while-using-mmdloader/78353/3 "2025-02-20T06:30:40Z")

</div>

Yes @manthrax you are right it was the issue with my model which didn’t have morph targets the other model with morph target worked!

Actually the model which does not have morph targets works when I use r87 also I was trying to migrate to new version but seems like it breaks a lot things.

I think this problem is due to the new version of MMDLoader uses different `MMDToonMaterial` but older version was using `THREE.MeshToonMaterial`.

I had modified r87 and files like MMDLoader, MMDPhysics, etc related to MMD to make them support ES Module syntax. I think I will just copy what things I need to update manually to my modified version.
