Confused about 3D Model and drawMesh() and effects

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Template for a basketball game with a 3D aspect (illusion of 3D)
  • I can get a 3D lighting effect which uses vWorldPos to work on 3D Shape and sprites. The vWorldPos varying in x,y,z.

    However, when I try on my mesh addon or the 3D Model addon, it does not seem like it has an effect. With my mesh addon, which uses drawMesh() it looks like predraw is happening (though I do not have that enabled in the addon). So the light effect happens _after_ predraw and is basically a blit, so it won't work.

    It seems like behavior happens with 3D Model also, is there a predraw?

    The lighting effect has this set:

    "must-predraw": false,

    "supports-3d-direct-rendering": true,

    I can send a bug report if needed, but perhaps I am just doing something wrong, I should have different setting for my effect or a different plugin setting for my object?

    Or does drawMesh() always fire a predraw? _If_ that is true, can we change it to it checks "supports-3d-direct-rendering" and doesn't do a predraw if that is the first effect in the chain?

    This is in editor, same light effect, w/ same parameters of both objects (3D Shape and 3D model)

    It looks the same at runtime.

    Thanks for the help. Lighting feels pretty close for 3D Model in addition to 3D Shape.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It is starting to feel like if "supports-3d-direct-rendering": true is set for an effect, for 3D Model and my Mesh addon (uses drawMesh()), my light effect applied to both is dropped and only the original simple frag shader runs.

  • There are several conditions that may result in a pre-draw, and they vary across the WebGL and WebGPU renderers. As ever, it's difficult to say for sure what's happening unless you share a sample project.

  • Will do. I wanted to check first if it was an obvious RTFM question or more detailed examination needed.

    Will provide sample, I'll add to the bug report, though it might be my issue.

  • github.com/Scirra/Construct-bugs/issues/9061

    Here's the test project.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)