Shader functioning in Inspector but not in-game
Asked Answered
H

4

0

Hello!
I have a laser that I set up with a Line2D and various particle emitters as children to a RayCast2D node.
I would like to add a shader to make the Line2D look nicer and I have one functioning - as it appears properly in the inspector preview - but nothing appears in the laser or main scenes. However, the particle emitters work still and no errors are thrown, just the line is invisible now.

I am happy to share my laser code if needed but are there general reasons as to why this occurs?

Hanus answered 19/11, 2023 at 21:16 Comment(0)
P
0

I suggest making a simple COLOR.rgb = vec3(UV,0.); shader and put it on the Line2D to see what its mesh is actually rendering.

Pulliam answered 19/11, 2023 at 21:30 Comment(0)
H
0

@"award"
renders a black line now

#p127885

Hanus answered 19/11, 2023 at 21:51 Comment(0)
P
0

It has no UVs then. Set the line's texture_mode to stretch and that should fix it.

Pulliam answered 19/11, 2023 at 22:28 Comment(0)
H
0

Pulliam Awesome that fixed it, thank you!

Hanus answered 19/11, 2023 at 22:51 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.