I’m trying to use two shader simultaneously
Renderer* renderer = GetSubsystem<Renderer>();
SharedPtr<Viewport> viewport(new Viewport(context_, scene_, cameraNode_->GetComponent<Camera>()));
renderer->SetViewport(0, viewport);
ResourceCache* cache = GetSubsystem<ResourceCache>();
SharedPtr<RenderPath> effectRenderPath = viewport->GetRenderPath()->Clone();
effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/Ripple.xml"));
effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/Vignette.xml"));
viewport->SetRenderPath(effectRenderPath);
and the program is crashed. Although individually shaders work normally. Also another combination work normally.
Renderer* renderer = GetSubsystem<Renderer>();
SharedPtr<Viewport> viewport(new Viewport(context_, scene_, cameraNode_->GetComponent<Camera>()));
renderer->SetViewport(0, viewport);
ResourceCache* cache = GetSubsystem<ResourceCache>();
SharedPtr<RenderPath> effectRenderPath = viewport->GetRenderPath()->Clone();
effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/Blur.xml"));
effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/GreyScale.xml"));
viewport->SetRenderPath(effectRenderPath);
Any ideas?