GithubHelp home page GithubHelp logo

aldo-canedo / normals-gpu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from loopervfx/normals-gpu

0.0 2.0 0.0 12.24 MB

Real-time GPU accelerated worldspace vertex normal computation techniques

License: MIT License

GLSL 100.00%

normals-gpu's Introduction

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 perhaps convoluted within TouchDesigner's standard 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 (No deformation with smooth vertex normals.)

Stanford Bunny (Twisted)
Stanford Bunny (Twisted on Y axis with smooth vertex normals.)

normals-gpu's People

Watchers

James Cloos avatar AldoCanedo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.