CustomProceduralTexture & config.json

Hi, is a test for a CustomProceduralTexture.
It works fine and CPT are great, but I always get an error message in the console about config.json (which I thought was not required when using the ShaderStore).

It is expected because the system tries to see if you are using a json file first

The system already has a nice error message when nothing works:
Logger.Error("No json or ShaderStore or DOM element found for CustomProceduralTexture");
From a user POV, I must admit that I find it a bit confusing to have an error when doing a valid usage. It feels like an error I could never get rid of… :wink:

We should move it to a simple message you are right :slight_smile:

(I’ll do it :))

1 Like

I’m not sure we are responsible for this message: it is the browser that logs this message when the file does not exist on the server… To avoid it, we would need a mode where we tell the texture constructor that the texturePath parameter is not a url/file path in the first place so that we don’t attempt to retrieve the file.

Agree this is the cleaner solution