Giter VIP home page Giter VIP logo

generic-raymarch-unity's Introduction

Distance Field Raymarcher for Unity

This is an implementation of Distance Field Raymarching in the Unity game engine. It was created to be used as a reference implementation in future projects. For a comprehensive technical writeup about how Distance Field Raymarching works, see this article on my blog.

Below are a few of the major features of this implementation:

  1. Complete Implementation of Distance Field Raymarching. This repository demonstrates how to construct a fully working implementation of Distance Field Raymarching. Using this repository as a base, you can focus on implementation details instead of the more technical aspects of raymarching. Additionally, I include a number of useful Distance Field primitives (sphere, box, torus, cylinder, etc) and Combine Operations (Union, Intersection, Subtraction) - see DistanceFunc.cginc for details. Below is a gif of the included demo scene:
  2. Interaction with mesh-based Objects. This implementation takes Unity's depth buffer into account, so your raymarched objects can intersect and interact with traditional mesh-based objects.
  3. Heatmap-based Performance Testing. The system has support for heatmap-based performance testing using a color ramp. Below is an example of this output (red = many samples per pixel, blue = fewer samples):
  4. Open Source and License. This implementation is released under the liberal MIT License, so it is easy use it in your projects.

generic-raymarch-unity's People

Contributors

flafla2 avatar

Watchers

 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.