Skip to content

Real-time GPU accelerated worldspace vertex normal computation techniques

License

Notifications You must be signed in to change notification settings

loopervfx/normals-gpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A demonstration of world-space normal deformation/computation techniques using geometry shaders, implemented in Derivative Touchdesigner 64-Bit Build 2018.23470. https://www.derivative.ca

Created for a talk given at TouchIn NYC May 2018, presented by Volvox Labs http://volvoxlabs.com and LiveX https://livex.tv/

Includes a real-time GPU accelerated "smooth" per vertex normal computation technique that I developed by emulating common CPU based methods for computing vertex normals for triangulated meshes.

This allows for non-uniform scaling and twisting / warping of the mesh while retaining smooth surface lighting.

Face normals and Vertex normals are both naively calculated here in a single shader pass using a nested loop for adjacent triangles.

A two pass method would be more efficient, but convoluted given TouchDesigner's (current) semi-fixed render pipeline for MATs / Materials.

This could also be adapted to a vertex shader only approach with the proper vertex attributes, or adapted to other OpenGL based engines/implementations.

Special Thanks:

Vincent Houzé http://vincenthouze.com

Elburz Sorkhabi http://elburz.io

Matthew Ragan http://matthewragan.com

Stanford Bunny (Regular) Stanford Bunny (Twisted)

About

Real-time GPU accelerated worldspace vertex normal computation techniques

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages