Jump to content

small bug in Scene.serializer with ShaderMaterials


Blax
 Share

Recommended Posts

Hi!

 

I found small bug in serializer.

It crash, if i try serialize scene with ShaderMaterial's.

 

Uncaught TypeError: Cannot read property 'asArray' of undefined

serializeMaterial @ babylon.max.js:24503

SceneSerializer.Serialize @ babylon.max.js:25000

 

ambientColor and etc property's is not present in ShaderMaterial's.  I think we need one 'if' there, who exclude all shaderMaterials from srialize process.

Link to comment
Share on other sites

Well, I found a different problem with the serialization, but what you refer to should not happen since 2.3. What version are you using?

The Shader's serialize function is not yet implemented, so the material won't serialize (not more than an ID). I will prevent it for now from happening, so there wouldn't be any "naked" materials with no content.

Link to comment
Share on other sites

Well, I found a different problem with the serialization, but what you refer to should not happen since 2.3. What version are you using?

The Shader's serialize function is not yet implemented, so the material won't serialize (not more than an ID). I will prevent it for now from happening, so there wouldn't be any "naked" materials with no content.

 

Hi!

I use 2.2 (i can't use 2.3. because get trouble with ArcRotateCamera). 

Bug is small and not is big problem :)

And yes, not necessary save naked material only with id, it only create excess test on loading.

 

Hope eventually we can use and custom shaders serializer ;)) Thank for fixes!!!

Link to comment
Share on other sites

And now you can :-)

 

I pushed a commit yesterday with shader material serialization and parsing. Should work with 2.3 as of... yesterday.

You will still need to provide your shaders, just like with regular shader material initialization. The serializer just takes your shader path definitions and export it.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...