Code Monkey home page Code Monkey logo

wee-to-shadertoy's Introduction

wee-to-shadertoy

Also known as, wee backend for ShaderToy.

Also known as, GLSL implementation of an interpreter or VM for https://github.com/nathanfarlow/wee

Running at https://www.shadertoy.com/view/mdtcW4

Features

  • Most wee instructions (mov, swap, add, sub, store, setlt, jmpz)
  • MMIO (mouse, keyboard, display)

Missing Features

  • Some nonessential wee instructions (getc, putc, exit)

Who needs those instructions anyway? It turns out that the "truly minimal instruction set" can be pruned of this ISA bloat and still be very functional.

Planned Features

  • MMIO-based ALU
  • Documentation! (standardized MMIO framework)

Usage

  • The VM is available at https://www.shadertoy.com/view/mdtcW4, with a sample program.
  • To run the interpreter on a different program, pipe the wee code to python3 encode.py, and put the output into the "Buffer A" tab. Then, just click the Compile (▶) button and the Reset (⏮) button.
  • For example, I used m4 prog.wee.m4 | python3 encode.py | xclip -sel c -i to evaluate the macros, convert from wee to glsl, and copy to clipboard so I can paste on the website.

wee-to-shadertoy's People

Contributors

vszabo2 avatar

Stargazers

 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.