3D outline for Godot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
David Hoppenbrouwers 6f50b6662e
Don't use duplicate, create new MeshInstance
3 months ago
addons/3d_outline Don't use duplicate, create new MeshInstance 3 months ago
screenshots Initial commit 3 months ago
test Initial commit 3 months ago
.gitignore Initial commit 3 months ago
LICENSE Initial commit 3 months ago
README.md Initial commit 3 months ago
default_env.tres Initial commit 3 months ago
project.godot Initial commit 3 months ago

README.md

3D outline shader(s) for Godot

This repository contains shaders for drawing outlines around objects.

There are currently 3 shaders available. Pick and modify as needed.

Currently all outlines are drawn regardless if they're behind an object or not. I may fix this later.

How it works

The shaders don't all work exactly the same but the general gist is as follows:

  • First, it draws a couple of meshes as plain white on a black background inside a viewport.
  • Then, it discards any pixels that are green (in the case of the blur shader, the other two check for a difference in the value of the red channel instead).
  • Finally, it blurs the red channel.

How to use it

The fastest way to get started is to add res://addons/3d_outline/outline.tscn to any scenes where you need an outline. Then, pass the MeshInstances that need an outline to outline_node

Screenshots

_ _