Coder Social home page Coder Social logo

raymarching's Introduction

RayMarching 2D Rendering

My personal rendering project inspired by @miloyip's articles on ZhiHu link

Improvements

Instead of using CPU to calculate light and outputing results to a png file as the author did in his articles, this project use GPU to accelerate computation and display results directly on screen.
Light calculations are done by fragment shader in GLSL(OpenGL), however even so the amount of computation power needed for rendering complex 2D SDF scenes (multiple sdf objects with reflection/refraction depth > 3) is beyond the reach of real-time rendering.
Thus the rendering of one result image is seperated into multiple iterations each draws a portion of the frame to the frame buffer object, but we can always trade lower rendering quality for less drawing time.

Techniques

  • OpenGL + GLSL
  • SDF objects
  • Reflection + Refraction + Fresnel-Schlick + Beer-Lambert
  • RGB color light support

Result Demo

Scene with one light source and multiple sdf objects Result1

raymarching's People

Contributors

amaranthyan avatar

Stargazers

Uğur Güney avatar Bob Poekert avatar

Watchers

James Cloos avatar  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.