• Stars
    star
    346
  • Rank 122,430 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementation of a post process outline shader in ThreeJS & PlayCanvas.

How to render outlines in WebGL

This is the source code for How to render outlines in WebGL & Better outline rendering using surface IDs with WebGL implemented in ThreeJS and PlayCanvas. This renders outlines with a post-process shader that takes the depth buffer and a surface normal buffer as inputs, followed by an FXAA pass.

Three versions of a boat 3D model showing the different outline techniquesBoat model by Google Poly

  • Left is a common way to visualize outlines, boundary only.
  • Middle is the technique in this repo.
  • Right is same as middle with outlines only.

Live demo

See live ThreeJS version.

Drag and drop any glTF file to see the outlines on your own models (must be a single .glb file).

Or click "Login to Sketchfab" and paste in any Sketchfab model URL, such as: https://sketchfab.com/3d-models/skull-downloadable-1a9db900738d44298b0bc59f68123393

Source code

Applying outlines selectively to objects

If you want to apply the outline effect to specific objects, instead of all objects in the scene, an example ThreeJS implementation is documented here: #3.

outline_selected

More Repositories

1

jpeg-sandbox

Interactively edit individual DCT blocks in any JPEG image in the browser.
JavaScript
392
star
2

google-earth-as-gltf

JavaScript
325
star
3

webgpu-compute-rasterizer

A simple software rasterizer running on a WebGPU compute shader. Built for educational purposes.
JavaScript
231
star
4

I-Spy-A-Ghost

An experimental p2p multiplayer game made in HTML5/Phaser using WebRTC in 48 hours for Ludum Dare
JavaScript
57
star
5

tutsplus-toon-water

Source code for my Tuts+ tutorial on creating toon water for the web.
JavaScript
39
star
6

lda-explorable

An interactive article about the geometric intuition behind Linear Discriminant Analysis.
JavaScript
30
star
7

threejs-sketchfab-example

Code example for loading 3D models from Sketchfab into ThreeJS
JavaScript
29
star
8

vite-hot-reload-example

Example setup using Vite hot module reloading for creative coding
JavaScript
18
star
9

Airena

Write & edit AI code on the fly to fight in the arena!
JavaScript
14
star
10

atom-tracer

A language agnostic Atom package for tracing variables inline!
Python
11
star
11

tutsplus-glitch-multiplayer

This project contains the complete example of my Tuts+ tutorial on creating a multiplayer game with Socket.io and Phaser.
HTML
8
star
12

entwined-web

Experimental prototype to port Entwined to the web
JavaScript
5
star
13

satcamp-bike-viz

CSS
4
star
14

basic-networking

A barebones example of how to set up a basic networking/multiplayer web app
HTML
4
star
15

map-my-ithaca

Art project for articulating the maps in our heads
JavaScript
3
star
16

web-boilerplate

My boilerplate setup for creative web projects
JavaScript
3
star
17

Kill-The-Red-Hat

A game/experiment written in nodejs and using socket.io and Three.js
JavaScript
3
star
18

Move-or-Die-Documentation

Documentation for the game Move or Die's source code
JavaScript
3
star
19

drone-jam

JavaScript
2
star
20

snakedragon-game

Game for GMTK 2021 jam
JavaScript
2
star
21

csta-materials

Resources for our CSTA 2017 talk on teaching by hacking on open source games
1
star
22

Using-Displacement-Shaders-to-Create-an-Underwater-Effect

This is a repository containing materials and examples for the Tuts+ tutorial.
HTML
1
star
23

glitchmultiplayer

Contains the starter kit & steps for the GlitchCon 2017 Socket.io multiplayer workshop
HTML
1
star
24

csb-l01dp

HTML
1
star
25

ShehataMedicalSystem

A simple Django app handling data entry, storage, and retrieval for patients in a clinic
Python
1
star