How to write a wireframe shader

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Gokudomatic2
:warning: Old Version Published before Godot 3 was released.

Hi

Did someone already write a 3d shader that display a mesh in wireframe? I’m kind of clueless with shaders.

I just tried to do that with Godot’s node-based shader editor and the text-based editor.

and failed.

and found this article… waiting for 3.0 may be an alternative.
using POSITION in frag shader causes GLSL compiler error · Issue #3226 · godotengine/godot · GitHub

eaglecat | 2016-04-07 08:34

Indeed. It looks like reduz is only focusing on 2d now.
By the way I’m curious about your attempt. Would you mind to share your shader’s code?

Gokudomatic2 | 2016-04-07 12:03

I just made the mesh faces invisible and transparent.
enter image description here
but I have no idea how to draw lines

eaglecat | 2016-04-07 12:31

I’m just keep messing around with godot shader.

how about this one? :smiley:

enter image description here

eaglecat | 2016-04-07 15:22

Thanks both of you.

Gokudomatic2 | 2016-04-08 11:24