Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/core/elementNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,10 @@ export class ElementNode {
}

// Can you put effects on Text nodes? Need to confirm...
if (SHADERS_ENABLED && props.shader && !props.shader.program) {
// A built shader node (WebGL, Canvas, or the DOM test fake) always has a
// `shaderType`; a raw StyleEffects props object never does. Only convert
// the latter — a built shader is already ready to render.
if (SHADERS_ENABLED && props.shader && !('shaderType' in props.shader)) {
props.shader = Config.convertToShader(node, props.shader);
}

Expand Down Expand Up @@ -1692,7 +1695,7 @@ export class ElementNode {
}
}

if (SHADERS_ENABLED && props.shader && !props.shader.program) {
if (SHADERS_ENABLED && props.shader && !('shaderType' in props.shader)) {
props.shader = Config.convertToShader(node, props.shader);
}

Expand Down
Loading