Skip to content

Interface: MeshShaderHooks ​

Experimental

GLSL spliced into the Plotly-model shader ('plotly' / 'flat' materials) at its hooks, e.g. surface contours or a wireframe overlay. Varyings available to fragment hooks: vLocal (RTC position), vViewPos, vNormal, vValue (intensity relative to its origin, with intensity); color is the straight-alpha sRGB color. Vertex hooks also apply to the pick pass (e.g. a displacement); uResolution / uPixelRatio (CSS px) are available to declare.

Properties ​

PropertyTypeDescription
color?stringExperimental Statements that may change color before lighting.
fragmentDecl?stringExperimental Declarations before the fragment shader's main.
lit?stringExperimental Statements that may change color after lighting.
uniforms?Record<string, IUniform<any>>Experimental Extra uniforms (shared with the pick material).
vertex?stringExperimental Statements at the end of the vertex shader's main (after gl_Position).
vertexDecl?stringExperimental Declarations before the vertex shader's main.

Released under the MIT License.