1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Move drawing of wield tool into a dedicated step of the pipeline (#13338)

This commit is contained in:
x2048 2023-03-19 21:31:15 +01:00 committed by GitHub
parent 09342c0811
commit 6cd2eea487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 9 deletions

View file

@ -73,19 +73,20 @@ void populateAnaglyphPipeline(RenderPipeline *pipeline, Client *client)
step3D->setRenderTarget(enable_override_material);
// left eye
pipeline->addStep(pipeline->createOwned<OffsetCameraStep>(false));
pipeline->addStep(pipeline->createOwned<SetColorMaskStep>(video::ECP_RED));
pipeline->addStep<OffsetCameraStep>(false);
pipeline->addStep<SetColorMaskStep>(video::ECP_RED);
pipeline->addStep(step3D);
// right eye
pipeline->addStep(pipeline->createOwned<OffsetCameraStep>(true));
pipeline->addStep(pipeline->createOwned<SetColorMaskStep>(video::ECP_GREEN | video::ECP_BLUE));
pipeline->addStep<OffsetCameraStep>(true);
pipeline->addStep<SetColorMaskStep>(video::ECP_GREEN | video::ECP_BLUE);
pipeline->addStep(step3D);
// reset
pipeline->addStep(pipeline->createOwned<OffsetCameraStep>(0.0f));
pipeline->addStep(pipeline->createOwned<SetColorMaskStep>(video::ECP_ALL));
pipeline->addStep<OffsetCameraStep>(0.0f);
pipeline->addStep<SetColorMaskStep>(video::ECP_ALL);
pipeline->addStep(pipeline->createOwned<MapPostFxStep>());
pipeline->addStep(pipeline->createOwned<DrawHUD>());
pipeline->addStep<DrawWield>();
pipeline->addStep<MapPostFxStep>();
pipeline->addStep<DrawHUD>();
}