Giter VIP home page Giter VIP logo

lunray's Introduction

Ray tracing experiment in Nelua

Screenshot

This project was developed for fun while Nelua was being created. Ray tracing in realtime on the CPU is hard and tackling this problem was interesting to check out the efficiency of Nelua language.

This is highly inspired on the Ray Tracing in One Weekend tutorial but with some personal customizations.

Controls

Use ASWDQE keys to walk and arrows to rotate the camera.

Running on the Web Browser with WASM

A demo with half resolution compiled with emscripten is available at https://edubart.github.io/lunray/ Your browser needs WASM support to run, note that this is running on the CPU inside the browser so slowness is expected, on my browser I get about ~11 FPS.

Running natively

With Nelua and SDL2 libs installed just do:

git clone https://github.com/edubart/lunray && cd lunray
nelua --maximum-performance lunray.nelua

For higher FPS uncomment the OPENMP = true line on lunray.nelua to enable multi-threading rendering. I get about ~18 FPS on the screenshot generated above.

lunray's People

Contributors

edubart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nsauzede

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.