72 if (!gd || !_sourceTexture || !_cameraComponent || !_cameraComponent->camera()) {
76 auto* camera = _cameraComponent->camera();
81 Texture* sceneDepth = _depthTexture ? _depthTexture : gd->sceneDepthMap();
82 if (!sceneDepth || sceneDepth->
width() != _sourceTexture->width() || sceneDepth->
height() != _sourceTexture->height()) {
83 assert(
false &&
"RenderPassTAA strict parity requires valid matching scene depth texture.");
87 std::array<float, 4> cameraParams = {
88 camera->farClip() > 0.0f ? (1.0f / camera->farClip()) : 0.0f,
94 gd->executeTAAPass(_sourceTexture,
95 _historyTextures[1 - _historyIndex].get(),
97 camera->viewProjectionPrevious(),
98 camera->viewProjectionInverse(),
103 _historyValid =
true;
113 _historyIndex = 1 - _historyIndex;
114 _historyTexture = _historyTextures[_historyIndex];
116 auto options = std::make_shared<RenderPassOptions>();
117 if (_sourceTexture) {
118 options->resizeSource = std::shared_ptr<Texture>(_sourceTexture, [](
Texture*) {});
120 init(_historyRenderTargets[_historyIndex], options);
122 return _historyTexture;
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.
PixelFormat format() const