Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nannou_isf progress, Update isf_demo.rs with basic GUI #684

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Jun 7, 2021

  1. nannou_isf progress, Update isf_demo.rs with basic GUI

    Thanks to @KeyboardSounds for mentioning the state of the nannou_isf
    crate in nannou-org#682 - I was reminded that I have a branch lying around which
    made a bit more progress!
    
    The `isf_demo.rs` example now provides a small GUI window with a list of
    shader paths read from the `assets/isf` directory. You can select
    between them to load an ISF pipeline for that shader. Once selected, the
    GUI should show whether the ISF descriptor, fragment and vertex shaders
    were parsed successfully. If everything was parsed successfully, a new
    ISF pipeline is loaded for the selected ISF shader. From this point, you
    should be able to edit the selected shader and have it automatically
    hotload the result when you save the file from your editor.
    
    Currently, the `assets/isf` directory contains a bunch of test shaders
    provided by the vidvox crew along with the original implementation. I'm
    not sure exactly what each should look like yet. Most fail to load
    still, though I don't quite remember how much of this is due to certain
    parts still being unimplemented in `nannou_isf`, and which parts are
    bugs in wgpu 0.5 (more likely the former!). There's a lot that goes on
    in the ISF pipeline, and little testing has been done so far, so I'm
    glad it's working as well as it does currently. I won't get a chance to
    dive much deeper for another month or two, but if you're interested in
    contributing to `nannou_isf`, doing some investigating into this could
    be a really nice way to do so while learning how wgpu works! It may be
    worth landing nannou-org#665 first as wgpu 0.6 has quite a bit more validation
    and error checking going on which could be useful to debug crashes that
    otherwise might be quite confusing in 0.5.
    mitchmindtree committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    c46cef7 View commit details
    Browse the repository at this point in the history
  2. WIP fixing uniforms layout, Fix some codegen formatting

    Still crashing frequently/unpredicatbly when switching between some
    shaders. Still need to fix name order of input uniforms.
    mitchmindtree committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    3bbb38f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    97ecd03 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2021

  1. Fix missing texture bindings and recreate pipeline on texture changes

    Fixes an issue where a texture would be omitted from the bind group
    layout if it was not yet loaded. This is not OK, as the shader code
    likely references the texture, meaning something has to be there whether
    or not it is loaded. To work around this, we now use a placeholder
    texture.
    
    We now properly compare the full list of texture descriptors when
    checking whether or not the bind group and pipeline need to be
    recreated. Previously we only checked the texture count, which means
    that if a placeholder texture was replaced with an actual texture the
    actual texture would never be loaded.
    mitchmindtree committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    cee3b1c View commit details
    Browse the repository at this point in the history