Coder Social home page Coder Social logo

Comments (2)

pchome avatar pchome commented on July 22, 2024

If you do not plan to create a ultimate shader loading tool, then you could split the code to create two separate vulkan layers and one meta-layer file to load both of them.

Let's say VK_LAYER_VKBASALT_cas and VK_LAYER_VKBASALT_fxaa, which can be used separately and VK_LAYER_VKBASALT_fxaa_cas as meta-layer.

{
    "file_format_version" : "1.1.0",
    "layer" : {
        "name": "VK_LAYER_VKBASALT_fxaa_cas",
        "type": "GLOBAL",
        "api_version": "1.1.125",
        "implementation_version": "1",
        "description": "a post process layer",
        "component_layers": [
            "VK_LAYER_VKBASALT_fxaa",
            "VK_LAYER_VKBASALT_cas"
        ]
    }
}

Later, in case there will be TXAA (if it even possible), just add one more small vulkan layer and new meta-layer file for VK_LAYER_VKBASALT_txaa_cas.

Also, in this case you may want to use built-in shader data. E.g. generate C header file and use it during compilation.

$ glslangValidator -V fxaa.frag --vn fxaaShaderData -o fxaa.h

An environment variable for CAS configuration let you completely avoid user data directory dependency. In case of an explicit vulkan layer the launch command could look like

$ VK_INSTANCE_LAYERS=VK_LAYER_VKBASALT_fxaa_cas CAS="0.1" vkcube

Layers and directory structure examples: vkBasalt.zip
LD_LIBRARY_PATH="/path/to/lib64:/path/to/lib" and ~/.local/share/vulkan/ (or VK_LAYER_PATH=/path/to/layer/file) for local installation.

from vkbasalt.

DadSchoorse avatar DadSchoorse commented on July 22, 2024

@pchome I have considered splitting the layer up, but this would be result in more memory fragmentation and adding new shaders would mean to many possible combination of those.

from vkbasalt.

Related Issues (20)

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.