Jump to content

Can't access IShaderMaterialOptions (while trying to make a ShaderHelper)


Nodragem
 Share

Recommended Posts

Hello,

I am trying to make an helper to load my shaders using a json file (linking to the fx files and textures).

For now, I am using this interface to read my json:

interface TextureDefinition {
    refName:string,
    path:string,
    wrapU:string,
    wrapV:string
}
interface ShaderDefiniton {
    refName:string,
    path:string,
    attributes:string[],
    uniforms:string[],
    textures: TextureDefinition[]
}

But I just realised that the attributes, uniforms and many other options are already part of IShaderMaterialOptions .

Hence I could take into account all shader options by using this interface:

interface TextureDefinition {
    refName:string,
    path:string,
    wrapU:string,
    wrapV:string
}
interface ShaderDefiniton {
    refName:string,
    path:string,
    options:BABYLON.IShaderMaterialOptions,
    textures: TextureDefinition[]
}

However, I get the following error:

screenshot1.png.83ea962fa6842fc9d27c416baf9c17cc.png

 

Am I not accessing IShaderMaterialOptions from the right place? I tried BABYLON.Material without any more success...

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...