Coder Social home page Coder Social logo

guohong365 / webgl-shader-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gkjohnson/webgl-shader-editor

0.0 0.0 0.0 4.77 MB

Realtime editor for creating webgl shaders

Home Page: https://gkjohnson.github.io/webgl-shader-editor/dist/index.bundle.html

License: MIT License

JavaScript 13.76% HTML 86.24%

webgl-shader-editor's Introduction

webgl-shader-editor

Realtime editor for creating webgl shaders with debugging tools to allow for inspecting local variable definitions in a fragment shader.

Demo

Example

Goal

After lot of frustration with developing shaders and not being able to easily track the calculations within a shader, I wanted explore what the possibilities for enabling a rich shader debugger might be light while still affording the direct shader code editing.

Features

Real Time Compilation and Render

As the vertex and fragment shader are updated, the render display is updated and errors are displayed as annotations.

Pixel Zoom

Zooming in on the image zooms in to a pixel view of the image.

Local Variable Value Inspection

Hovering over a pixel in the preview pane will display the values of all the local variables used for that pixel.

Local Variable Color Display

Every local variable will be displayed as a rendered image in the preview bar as though that variable were used to output the color for that fragment.

LocalStorage Saving

The vertex and fragment shader being written are saved and reloaded on refresh

Caveats

  • Because colors are stored as 4 8bit values, there is a severe loss of precision when reading out floating point values. Issue 1, Issue 2

TODO

  • Add pause button for animated variables
  • Texture upload
  • Uniform variable edit UI
  • Multi-pass shaders, stencil buffer, and screen post-effects
  • Add mouse position into shader uniforms

webgl-shader-editor's People

Contributors

gkjohnson 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.