waverider Posted January 3, 2018 Share Posted January 3, 2018 hello 2k18 squads! I just want to know does babylonjs serialize shadermaterial with a mesh or am i doing something wrong https://www.babylonjs-playground.com/#MWPSLI I tried loading the serialized json.babylon in the editor but it only gives me a clear plane object Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 3, 2018 Share Posted January 3, 2018 Shader Material does have a serialize and parse functions, which means - it does serialize correctly. What you are (probably) missing, is the actually definition of the shader, which is located in BABYLON.Effect.ShadersStore["customVertexShader"] . You will have to add it yourself and then parse the material. You will also need to serialize the entire scene, otherwise you will not get the material itself, just the mesh referencing a non-existing material: https://www.babylonjs-playground.com/#MWPSLI#1 I hope this helps! waverider 1 Quote Link to comment Share on other sites More sharing options...
waverider Posted January 3, 2018 Author Share Posted January 3, 2018 yeah sure it does Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 3, 2018 Share Posted January 3, 2018 https://www.babylonjs-playground.com/#QJE3YB#11 Hes right. The shader serializes, but the mesh with it attached drops an error... waverider 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.