Nodragem

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

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.