https://github.com/demindiro/godot-3d-outline
3D outline shader + scene for the Godot Engine
https://github.com/demindiro/godot-3d-outline
Last synced: about 1 year ago
JSON representation
3D outline shader + scene for the Godot Engine
- Host: GitHub
- URL: https://github.com/demindiro/godot-3d-outline
- Owner: Demindiro
- License: mit
- Created: 2021-03-07T13:39:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-07T14:58:18.000Z (over 5 years ago)
- Last Synced: 2025-02-07T06:26:56.492Z (over 1 year ago)
- Language: GLSL
- Homepage:
- Size: 885 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 `MeshInstance`s that need an outline to `outline_node`
## Screenshots

