Skip to content
Open
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
12 changes: 10 additions & 2 deletions src/core/elementNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,11 @@ export class ElementNode {
}

// Can you put effects on Text nodes? Need to confirm...
if (SHADERS_ENABLED && props.shader && !props.shader.program) {
if (
SHADERS_ENABLED &&
props.shader &&
!('program' in props.shader || 'render' in props.shader) // If not a raw shader

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just look for render? Do we need both program and render?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that "render" is added in the Canvas shader node and "program" in the WebGL shader node, so we should check for the presence of any of the two

) {
props.shader = Config.convertToShader(node, props.shader);
}

Expand Down Expand Up @@ -1675,7 +1679,11 @@ export class ElementNode {
}
}

if (SHADERS_ENABLED && props.shader && !props.shader.program) {
if (
SHADERS_ENABLED &&
props.shader &&
!('program' in props.shader || 'render' in props.shader) // If not a raw shader
) {
props.shader = Config.convertToShader(node, props.shader);
}

Expand Down