| 466 | } |
| 467 | |
| 468 | void RenderList::RunCustomPostFxPass(GPUContext* context, RenderContext& renderContext, PostProcessEffectLocation location, GPUTexture*& input, GPUTexture*& output) |
| 469 | { |
| 470 | if (!(renderContext.View.Flags & ViewFlags::CustomPostProcess)) |
| 471 | return; |
| 472 | for (PostProcessEffect* fx : renderContext.List->PostFx) |
| 473 | { |
| 474 | if (fx->Location == location) |
| 475 | { |
| 476 | context->ResetSR(); |
| 477 | if (fx->UseSingleTarget || output == nullptr) |
| 478 | { |
| 479 | fx->Render(context, renderContext, input, nullptr); |
| 480 | } |
| 481 | else |
| 482 | { |
| 483 | fx->Render(context, renderContext, input, output); |
| 484 | Swap(input, output); |
| 485 | } |
| 486 | context->ResetRenderTarget(); |
| 487 | context->ResetSR(); |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | bool RenderList::HasAnyPostFx(const RenderContext& renderContext, PostProcessEffectLocation postProcess) const |
| 493 | { |
no test coverage detected