Type Alias IShaderPath
type IShaderPath = {
fragment?: string;
fragmentElement?: string;
fragmentSource?: string;
spectorName?: string;
vertex?: string;
vertexElement?: string;
vertexSource?: string;
}
fragment?: string;
fragmentElement?: string;
fragmentSource?: string;
spectorName?: string;
vertex?: string;
vertexElement?: string;
vertexSource?: string;
}
Index
Properties
Optionalfragment
fragment?: string
Used with Effect.ShadersStore. If the fragment is set to "custom, then
Babylon.js will read from Effect.ShadersStore["customFragmentShader"]
Optionalfragment Element
fragmentElement?: string
Used with shader code in script tags
Optionalfragment Source
fragmentSource?: string
Directly pass the shader code
Optionalspector Name
spectorName?: string
Defines the name appearing in spector when framgent/vertex...source are being used
Optionalvertex
vertex?: string
Used with Effect.ShadersStore. If the vertex is set to "custom, then
Babylon.js will read from Effect.ShadersStore["customVertexShader"]
Optionalvertex Element
vertexElement?: string
Used with shader code in script tags
Optionalvertex Source
vertexSource?: string
Directly pass the shader code
Defines the route to the shader code. The priority is as follows:
{ vertexSource: "vertex shader code string", fragmentSource: "fragment shader code string" }for directly passing the shader code{ vertexElement: "vertexShaderCode", fragmentElement: "fragmentShaderCode" }, used with shader code in script tags{ vertex: "custom", fragment: "custom" }, used withEffect.ShadersStore["customVertexShader"]andEffect.ShadersStore["customFragmentShader"]"./COMMON_NAME", used with external files COMMON_NAME.vertex.fx and COMMON_NAME.fragment.fx in index.html folder.