Skip to content

Try to add shader includes and make reuseable light rendering functions #199

@Moneyl

Description

@Moneyl

Right now many shaders only differ by their vertex layouts. Tons of duplicate code. Could make a light rendering function that could be reused on many of the shaders. Also could define all the shader constants once like in the old DX11 renderer. Need to figure out how to make the includes work with the shaderc wrapper Silk.NET provides.

If it doesn't have support for that just make our own include system with string.Replace. Maybe add a few more special characters around the includes to make sure it doesn't accidentally delete real code or comments. Make sure the include code is recursive, by keep a list of included files to detect loops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions