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

Shader Pass support #1067

Closed
ogniK5377 opened this issue Oct 9, 2021 · 0 comments
Closed

Shader Pass support #1067

ogniK5377 opened this issue Oct 9, 2021 · 0 comments
Labels
feature request New feature request

Comments

@ogniK5377
Copy link
Contributor

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

@ogniK5377 ogniK5377 added the feature request New feature request label Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants