Skip to content

update ispc_dso_generate to handle multi-output shaders #301

Description

@pramsey1234

Update cmake_modules/build_scripts/ispc_dso_generate

  • declare the outputs on the SceneClass
  • Provide a structure for multi-output shaders use for returning results

Some Implementation Thoughts

  • Accept shader json files having multiple named and typed outputs
  • declare the outputs in the attributes.cc file using the new SceneClass functions
    For each output add a line to attribute.cc - sceneClass.declareAttribute<{typename}>("{name}", {uniformity})
  • define structs in attributes.cc and attributes.isph which include all of the outputs in the order defined in the json file
    For multi-output shaders declare a structure named "{shadername}_return_data" in attributes.cc with a member for each output of the appropriate type. (Bool, Int, Float, Vec2g, Vec3f, Vec4f, Color, Rgba, Mat3f, or Mat4f).

In the process of naming other things in this project it seems apparent that the existing "outputAttributes" record in the shader json files is probably misnamed and should just be something like "outputs". During transition it might be a good idea to recognize either "output" or "outputAttributes" as the list of output attributes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions