Another take at decals

Captain Caveman forever!
“Goldorak, Go!”

Decals in Babylon.js

Texture Decals

Implementation

Wrong decal rendering
Right decal rendering

Texture space rendering

Vertex shader
Fragment shader
Texture space rendering

Generating the decal texture

Main shader code for decal texture space projection

Demos

Going further

GIF courtesy of WiperTags Wiper Covers on GIPHY

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Babylon.js

Babylon.js

1.4K Followers

Babylon.js: Powerful, Beautiful, Simple, Open — Web-Based 3D At Its Best. https://www.babylonjs.com/