Function: createPrimitiveMaterial()
ts
function createPrimitiveMaterial(params): ShaderMaterial;Experimental
Default material for 2D/3D chart primitives: GLSL3 (in/out, declare out highp vec4 fragColor; in the fragment shader), straight (non-premultiplied) alpha blending, depth test on so 3D scenes occlude, depth write off so anti-aliased fringes never punch holes. Colors are written unconverted: inputs are already sRGB (see types.ts).
Parameters
| Parameter | Type |
|---|---|
params | { defines?: Record<string, string | number | boolean>; fragmentShader: string; uniforms: Record<string, IUniform>; vertexShader: string; } |
params.defines? | Record<string, string | number | boolean> |
params.fragmentShader | string |
params.uniforms | Record<string, IUniform> |
params.vertexShader | string |
Returns
ShaderMaterial