Giter VIP home page Giter VIP logo

fractured's Introduction

Fractured

A realtime fractal flames renderer powered by WebGpu.

A live demo is hosted on github pages

โš ๏ธ You will need to enable the web gpu experimental feature on your browser to render fractal.

Fractal generated

The fractal generated are all pretty diverse, apart from the fact that many revolve around symmetry.

Here you can find a list of fractal generated with this project :

A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal

A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal A flames fractal

fractured's People

Contributors

reimua avatar

Stargazers

 avatar  avatar NySwann avatar  avatar

Watchers

 avatar

fractured's Issues

Flames final component isn't applied

Apply flame return the base transformation without applying the final component.

fn applyFlames(p: vec2<f32>, componentIdx: u32) -> vec2<f32> {
    let newP = applyComponent(p, flames.components[componentIdx]);
    return newP;
    return applyComponent(p, flames.finalComponent);
}

Coloration handled in a compute shader

Coloration done in a compute shader.
The maximum size allowed for gpu storage buffer will be a problem.
The maximum number of storage buffer per shader is also problematic.

Use compute shader to generate heatmap

Parameters :

  • zoom
  • rotation
  • flames
    • IFS transform (a, b, c, e ,f ,g)
    • Variations component (id / parameter)
    • Final variations (id / parameter)
  • number of iteration per unit

Output :

  • Heatmap
  • Color accumulator for palette
  • Color accumulator for index

Create a web gpu compute pipeline chain

Render logic should be expressed as a webgpu render pipeline, instead of javascript hosted in a worker.

IE: 1 vertex shader, and 3 fragment shader with some uniform and binding layout.

Improve performance

Performance can be drastically improved by using WebGpu as it offer compute shaders capacity for the heatmap generation :

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.