Skip to content

Shader Pass support #1067

@ogniK5377

Description

@ogniK5377

What can't you do?
Currently, there's no easy way to handle shader passes. The way to deal with multiple shader passes is to manually render the object twice with a RenderEntity and calling drawing the same object multiple time using different materials.

How would you like it to work?

ShaderPassCount(2);

#if (S_SHADER_PASS == 0)
// Do shader pass 1
#elif (S_SHADER_PASS == 1)
// Do shader pass 2
#endif

What have you tried?
Currently, the only other way to deal with this is to force an object to render right after the other manually. One method of this is to use the DoRender override for RenderEntities.

public override void DoRender( SceneObject obj )
{
     _vertexBuffer.Draw( _materialPass1 );
     _vertexBuffer.Draw( _materialPass2 );
}

Additional context
Define an extra pass should just render the object multiple times in successive order and rendering on the correct pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions