BsRenderCompositor.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsRenderBeastPrerequisites.h"
  5. namespace bs
  6. {
  7. class RendererExtension;
  8. namespace ct
  9. {
  10. struct SceneInfo;
  11. class RendererViewGroup;
  12. class RenderCompositorNode;
  13. struct PooledStorageBuffer;
  14. struct FrameInfo;
  15. /** @addtogroup RenderBeast
  16. * @{
  17. */
  18. /** Inputs provided to each node in the render compositor hierarchy */
  19. struct RenderCompositorNodeInputs
  20. {
  21. RenderCompositorNodeInputs(const RendererViewGroup& viewGroup, const RendererView& view, const SceneInfo& scene,
  22. const RenderBeastOptions& options, const FrameInfo& frameInfo, RenderBeastFeatureSet featureSet)
  23. : viewGroup(viewGroup), view(view), scene(scene), options(options), frameInfo(frameInfo), featureSet(featureSet)
  24. { }
  25. const RendererViewGroup& viewGroup;
  26. const RendererView& view;
  27. const SceneInfo& scene;
  28. const RenderBeastOptions& options;
  29. const FrameInfo& frameInfo;
  30. const RenderBeastFeatureSet featureSet;
  31. // Callbacks to external systems can hook into the compositor
  32. SmallVector<RendererExtension*, 4> extPrepare;
  33. SmallVector<RendererExtension*, 4> extPreBasePass;
  34. SmallVector<RendererExtension*, 4> extPostBasePass;
  35. SmallVector<RendererExtension*, 4> extPostLighting;
  36. SmallVector<RendererExtension*, 4> extOverlay;
  37. SmallVector<RenderCompositorNode*, 4> inputNodes;
  38. };
  39. /**
  40. * Node in the render compositor hierarchy. Nodes can be implemented to perform specific rendering tasks. Each node
  41. * can depend on other nodes in the hierarchy.
  42. *
  43. * @note Implementations must provide a getNodeId() and getDependencies() static method, which are expected to
  44. * return a unique name for the implemented node, as well as a set of nodes it depends on.
  45. */
  46. class RenderCompositorNode
  47. {
  48. public:
  49. virtual ~RenderCompositorNode() { }
  50. protected:
  51. friend class RenderCompositor;
  52. /** Executes the task implemented in the node. */
  53. virtual void render(const RenderCompositorNodeInputs& inputs) = 0;
  54. /**
  55. * Cleans up any temporary resources allocated in a render() call. Any resources lasting longer than one frame
  56. * should be kept alive and released in some other manner.
  57. */
  58. virtual void clear() = 0;
  59. };
  60. /**
  61. * Performs rendering by iterating over a hierarchy of render nodes. Each node in the hierarchy performs a specific
  62. * rendering tasks and passes its output to the dependant node. The system takes care of initializing, rendering and
  63. * cleaning up nodes automatically depending on their dependencies.
  64. */
  65. class RenderCompositor
  66. {
  67. /** Contains internal information about a single render node. */
  68. struct NodeInfo
  69. {
  70. RenderCompositorNode* node;
  71. UINT32 lastUseIdx;
  72. SmallVector<RenderCompositorNode*, 4> inputs;
  73. };
  74. public:
  75. ~RenderCompositor();
  76. /**
  77. * Rebuilds the render node hierarchy. Call this whenever some setting that may influence the render node
  78. * dependencies changes.
  79. *
  80. * @param[in] view Parent view to which this compositor belongs to.
  81. * @param[in] finalNode Identifier of the final node in the node hierarchy. This node is expected to write
  82. * to the views render target. All other nodes will be deduced from this node's
  83. * dependencies.
  84. */
  85. void build(const RendererView& view, const StringID& finalNode);
  86. /** Performs rendering using the current render node hierarchy. This is expected to be called once per frame. */
  87. void execute(RenderCompositorNodeInputs& inputs) const;
  88. private:
  89. /** Clears the render node hierarchy. */
  90. void clear();
  91. Vector<NodeInfo> mNodeInfos;
  92. bool mIsValid = false;
  93. /************************************************************************/
  94. /* NODE TYPES */
  95. /************************************************************************/
  96. public:
  97. /** Contains information about a specific node type. */
  98. struct NodeType
  99. {
  100. virtual ~NodeType() {};
  101. /** Creates a new node of this type. */
  102. virtual RenderCompositorNode* create() const = 0;
  103. /** Returns identifier for all the dependencies of a node of this type. */
  104. virtual SmallVector<StringID, 4> getDependencies(const RendererView& view) const = 0;
  105. StringID id;
  106. };
  107. /** Templated implementation of NodeType. */
  108. template<class T>
  109. struct TNodeType : NodeType
  110. {
  111. /** @copydoc NodeType::create() */
  112. RenderCompositorNode* create() const override { return bs_new<T>(); }
  113. /** @copydoc NodeType::getDependencies() */
  114. SmallVector<StringID, 4> getDependencies(const RendererView& view) const override
  115. {
  116. return T::getDependencies(view);
  117. }
  118. };
  119. /**
  120. * Registers a new type of node with the system. Each node type must first be registered before it can be used
  121. * in the node hierarchy.
  122. */
  123. template<class T>
  124. static void registerNodeType()
  125. {
  126. auto findIter = mNodeTypes.find(T::getNodeId());
  127. if (findIter != mNodeTypes.end())
  128. LOGERR("Found two render compositor nodes with the same name \"" + String(T::getNodeId().cstr()) + "\".");
  129. mNodeTypes[T::getNodeId()] = bs_new<TNodeType<T>>();
  130. }
  131. /** Releases any information about render node types. */
  132. static void cleanUp()
  133. {
  134. for (auto& entry : mNodeTypes)
  135. bs_delete(entry.second);
  136. mNodeTypes.clear();
  137. }
  138. private:
  139. static UnorderedMap<StringID, NodeType*> mNodeTypes;
  140. };
  141. /************************************************************************/
  142. /* BASE PASS NODES */
  143. /************************************************************************/
  144. /** Initializes the scene depth texture. Does not perform any rendering. */
  145. class RCNodeSceneDepth : public RenderCompositorNode
  146. {
  147. public:
  148. // Outputs
  149. SPtr<PooledRenderTexture> depthTex;
  150. static StringID getNodeId() { return "SceneDepth"; }
  151. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  152. protected:
  153. /** @copydoc RenderCompositorNode::render */
  154. void render(const RenderCompositorNodeInputs& inputs) override;
  155. /** @copydoc RenderCompositorNode::clear */
  156. void clear() override;
  157. };
  158. /**
  159. * Initializes the GBuffer textures and renders the base pass into the GBuffer. The base pass includes all the opaque
  160. * objects visible to the view.
  161. */
  162. class RCNodeGBuffer : public RenderCompositorNode
  163. {
  164. public:
  165. // Outputs
  166. SPtr<PooledRenderTexture> albedoTex;
  167. SPtr<PooledRenderTexture> normalTex;
  168. SPtr<PooledRenderTexture> roughMetalTex;
  169. SPtr<RenderTexture> renderTarget;
  170. static StringID getNodeId() { return "GBuffer"; }
  171. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  172. protected:
  173. /** @copydoc RenderCompositorNode::render */
  174. void render(const RenderCompositorNodeInputs& inputs) override;
  175. /** @copydoc RenderCompositorNode::clear */
  176. void clear() override;
  177. };
  178. /** Initializes the scene color texture and/or buffer. Does not perform any rendering. */
  179. class RCNodeSceneColor : public RenderCompositorNode
  180. {
  181. public:
  182. // Outputs
  183. /**
  184. * Contains scene color. If MSAA is used this texture will be null until the flattened data from the buffer is
  185. * first resolved into this texture.
  186. */
  187. SPtr<PooledRenderTexture> sceneColorTex;
  188. /**
  189. * Flattened, buffer version of sceneColorTex. Only available when MSAA is used, since random writes to multisampled
  190. * textures aren't supported on all render backends.
  191. */
  192. SPtr<PooledStorageBuffer> flattenedSceneColorBuffer;
  193. SPtr<RenderTexture> renderTarget;
  194. static StringID getNodeId() { return "SceneColor"; }
  195. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  196. protected:
  197. /** @copydoc RenderCompositorNode::render */
  198. void render(const RenderCompositorNodeInputs& inputs) override;
  199. /** @copydoc RenderCompositorNode::clear */
  200. void clear() override;
  201. };
  202. /**
  203. * Determines which samples in the GBuffer require per-sample shading and outputs a texture with the coverage (for use
  204. * in compute shaders) and populates the primary stencil buffer as well (for use in non-compute shaders). Only relevant
  205. * when rendering with MSAA enabled.
  206. */
  207. class RCNodeMSAACoverage : public RenderCompositorNode
  208. {
  209. public:
  210. // Outputs
  211. SPtr<PooledRenderTexture> output;
  212. static StringID getNodeId() { return "MSAACoverage"; }
  213. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  214. protected:
  215. /** @copydoc RenderCompositorNode::render */
  216. void render(const RenderCompositorNodeInputs& inputs) override;
  217. /** @copydoc RenderCompositorNode::clear */
  218. void clear() override;
  219. };
  220. /************************************************************************/
  221. /* LIGHTING NODES */
  222. /************************************************************************/
  223. /** Initializes the light accumulation texture and/or buffer. Does not perform any rendering. */
  224. class RCNodeLightAccumulation : public RenderCompositorNode
  225. {
  226. public:
  227. // Outputs
  228. /**
  229. * Contains lighting information accumulated from multiple lights. If MSAA is used this texture will be null until
  230. * the flattened data from the buffer is first resolved into this texture.
  231. */
  232. SPtr<PooledRenderTexture> lightAccumulationTex;
  233. /**
  234. * Flattened, buffer version of lightAccumulationTex. Only available when MSAA is used, since random writes to
  235. * multisampled textures aren't supported on all render backends.
  236. */
  237. SPtr<PooledStorageBuffer> flattenedLightAccumBuffer;
  238. SPtr<RenderTexture> renderTarget;
  239. static StringID getNodeId() { return "LightAccumulation"; }
  240. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  241. protected:
  242. /** @copydoc RenderCompositorNode::render */
  243. void render(const RenderCompositorNodeInputs& inputs) override;
  244. /** @copydoc RenderCompositorNode::clear */
  245. void clear() override;
  246. bool mOwnsTexture = false;
  247. };
  248. /**
  249. * Performs tiled deferred lighting, outputing any lighting information in the light accumulation buffer.
  250. * By default only non-shadowed lights are rendered, as shadowed ones are handled using standard deferred.
  251. */
  252. class RCNodeTiledDeferredLighting : public RenderCompositorNode
  253. {
  254. public:
  255. // Outputs
  256. RCNodeLightAccumulation* output;
  257. static StringID getNodeId() { return "TiledDeferredLighting"; }
  258. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  259. protected:
  260. /** @copydoc RenderCompositorNode::render */
  261. void render(const RenderCompositorNodeInputs& inputs) override;
  262. /** @copydoc RenderCompositorNode::clear */
  263. void clear() override;
  264. };
  265. /**
  266. * Performs standard deferred lighting, outputting any lighting information in the light accumulation buffer.
  267. * Normally only used for shadowed light rendering, unless tiled deferred is unavailable, in which case it renders
  268. * all lights.
  269. */
  270. class RCNodeStandardDeferredLighting : public RenderCompositorNode
  271. {
  272. public:
  273. static StringID getNodeId() { return "StandardDeferredLighting"; }
  274. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  275. protected:
  276. /** @copydoc RenderCompositorNode::render */
  277. void render(const RenderCompositorNodeInputs& inputs) override;
  278. /** @copydoc RenderCompositorNode::clear */
  279. void clear() override;
  280. SPtr<RenderTexture> mLightOcclusionRT;
  281. };
  282. /**
  283. * Render reflection probes and sky reflections using standard deferred lighting. Only used if tiled deferred IBL
  284. * is not supported.
  285. */
  286. class RCNodeStandardDeferredIBL : public RenderCompositorNode
  287. {
  288. public:
  289. static StringID getNodeId() { return "StandardDeferredIBL"; }
  290. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  291. protected:
  292. /** @copydoc RenderCompositorNode::render */
  293. void render(const RenderCompositorNodeInputs& inputs) override;
  294. /** @copydoc RenderCompositorNode::clear */
  295. void clear() override;
  296. };
  297. /**
  298. * In case light accumulation was rendered into a buffer instead of a texture (if MSAA is used), this node will
  299. * unflatten the buffer and write its contents into the light accumulation texture.
  300. */
  301. class RCNodeUnflattenLightAccum : public RenderCompositorNode
  302. {
  303. public:
  304. // Outputs
  305. RCNodeLightAccumulation* output;
  306. static StringID getNodeId() { return "UnflattenLightAccum"; }
  307. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  308. protected:
  309. /** @copydoc RenderCompositorNode::render */
  310. void render(const RenderCompositorNodeInputs& inputs) override;
  311. /** @copydoc RenderCompositorNode::clear */
  312. void clear() override;
  313. };
  314. /** Evaluates indirect lighting from the light probe volume, if available, or the sky irradiance otherwise. */
  315. class RCNodeIndirectLighting : public RenderCompositorNode
  316. {
  317. public:
  318. // Outputs to the unflattened RCNodeLightAccumulation
  319. static StringID getNodeId() { return "IndirectLighting"; }
  320. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  321. protected:
  322. /** @copydoc RenderCompositorNode::render */
  323. void render(const RenderCompositorNodeInputs& inputs) override;
  324. /** @copydoc RenderCompositorNode::clear */
  325. void clear() override;
  326. };
  327. /**
  328. * Performs tiled deferred image based lighting, combines it with direct lighting present in the light accumulation
  329. * buffer and outputs the results to the scene color texture or buffer.
  330. */
  331. class RCNodeTiledDeferredIBL : public RenderCompositorNode
  332. {
  333. public:
  334. // Outputs
  335. RCNodeLightAccumulation* output;
  336. static StringID getNodeId() { return "TiledDeferredIBL"; }
  337. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  338. protected:
  339. /** @copydoc RenderCompositorNode::render */
  340. void render(const RenderCompositorNodeInputs& inputs) override;
  341. /** @copydoc RenderCompositorNode::clear */
  342. void clear() override;
  343. };
  344. /** Renders transparent objects using clustered forward rendering. */
  345. class RCNodeClusteredForward : public RenderCompositorNode
  346. {
  347. public:
  348. RCNodeClusteredForward();
  349. static StringID getNodeId() { return "ClusteredForward"; }
  350. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  351. protected:
  352. /** @copydoc RenderCompositorNode::render */
  353. void render(const RenderCompositorNodeInputs& inputs) override;
  354. /** @copydoc RenderCompositorNode::clear */
  355. void clear() override;
  356. };
  357. /**
  358. * In case scene color was rendered into a buffer instead of a texture (if MSAA is used), this node will
  359. * unflatten the buffer and write its contents into the scene color texture.
  360. */
  361. class RCNodeUnflattenSceneColor : public RenderCompositorNode
  362. {
  363. public:
  364. // Outputs
  365. RCNodeSceneColor* output;
  366. static StringID getNodeId() { return "UnflattenSceneColor"; }
  367. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  368. protected:
  369. /** @copydoc RenderCompositorNode::render */
  370. void render(const RenderCompositorNodeInputs& inputs) override;
  371. /** @copydoc RenderCompositorNode::clear */
  372. void clear() override;
  373. };
  374. /**
  375. * Renders the skybox into the scene color texture. If skybox texture is not available, a solid color will be rendered
  376. * instead.
  377. */
  378. class RCNodeSkybox : public RenderCompositorNode
  379. {
  380. public:
  381. static StringID getNodeId() { return "Skybox"; }
  382. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  383. protected:
  384. /** @copydoc RenderCompositorNode::render */
  385. void render(const RenderCompositorNodeInputs& inputs) override;
  386. /** @copydoc RenderCompositorNode::clear */
  387. void clear() override;
  388. };
  389. /** Moves the contents of the scene color texture into the view's output target. */
  390. class RCNodeFinalResolve : public RenderCompositorNode
  391. {
  392. public:
  393. static StringID getNodeId() { return "FinalResolve"; }
  394. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  395. protected:
  396. /** @copydoc RenderCompositorNode::render */
  397. void render(const RenderCompositorNodeInputs& inputs) override;
  398. /** @copydoc RenderCompositorNode::clear */
  399. void clear() override;
  400. };
  401. /************************************************************************/
  402. /* POST PROCESS NODES */
  403. /************************************************************************/
  404. /**
  405. * Helper node used for post-processing. Takes care of allocating and switching between textures used for post process
  406. * effects.
  407. */
  408. class RCNodePostProcess : public RenderCompositorNode
  409. {
  410. public:
  411. RCNodePostProcess();
  412. /**
  413. * Returns a texture that can be used for rendering a post-process effect, and the result of the previous
  414. * output. Switches these textures so the next call they are returned in the opposite parameters.
  415. */
  416. void getAndSwitch(const RendererView& view, SPtr<RenderTexture>& output, SPtr<Texture>& lastFrame) const;
  417. /** Returns a texture that contains the last rendererd post process output. */
  418. SPtr<Texture> getLastOutput() const;
  419. static StringID getNodeId() { return "PostProcess"; }
  420. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  421. protected:
  422. /** @copydoc RenderCompositorNode::render */
  423. void render(const RenderCompositorNodeInputs& inputs) override;
  424. /** @copydoc RenderCompositorNode::clear */
  425. void clear() override;
  426. mutable SPtr<PooledRenderTexture> mOutput[2];
  427. mutable bool mAllocated[2];
  428. mutable UINT32 mCurrentIdx = 0;
  429. };
  430. /**
  431. * Performs tone mapping on the contents of the scene color texture. At the same time resolves MSAA into a non-MSAA
  432. * scene color texture.
  433. */
  434. class RCNodeTonemapping : public RenderCompositorNode
  435. {
  436. public:
  437. SPtr<PooledRenderTexture> eyeAdaptation;
  438. SPtr<PooledRenderTexture> prevEyeAdaptation;
  439. ~RCNodeTonemapping();
  440. static StringID getNodeId() { return "Tonemapping"; }
  441. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  442. protected:
  443. /** @copydoc RenderCompositorNode::render */
  444. void render(const RenderCompositorNodeInputs& inputs) override;
  445. /** @copydoc RenderCompositorNode::clear */
  446. void clear() override;
  447. /**
  448. * Returns true if the more advanced (and more expensive) compute shader based method of computing eye adaptation
  449. * should be used.
  450. */
  451. bool useHistogramEyeAdapatation(const RenderCompositorNodeInputs& inputs);
  452. SPtr<PooledRenderTexture> mTonemapLUT;
  453. UINT64 mTonemapLastUpdateHash = -1;
  454. };
  455. /** Renders the depth of field effect using Gaussian blurring. */
  456. class RCNodeGaussianDOF : public RenderCompositorNode
  457. {
  458. public:
  459. static StringID getNodeId() { return "GaussianDOF"; }
  460. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  461. protected:
  462. /** @copydoc RenderCompositorNode::render */
  463. void render(const RenderCompositorNodeInputs& inputs) override;
  464. /** @copydoc RenderCompositorNode::clear */
  465. void clear() override;
  466. };
  467. /** Renders FXAA. */
  468. class RCNodeFXAA : public RenderCompositorNode
  469. {
  470. public:
  471. static StringID getNodeId() { return "FXAA"; }
  472. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  473. protected:
  474. /** @copydoc RenderCompositorNode::render */
  475. void render(const RenderCompositorNodeInputs& inputs) override;
  476. /** @copydoc RenderCompositorNode::clear */
  477. void clear() override;
  478. };
  479. /************************************************************************/
  480. /* SCREEN SPACE */
  481. /************************************************************************/
  482. /** Resolves the depth buffer (if multi-sampled). Otherwise just references the original depth buffer. */
  483. class RCNodeResolvedSceneDepth : public RenderCompositorNode
  484. {
  485. public:
  486. SPtr<PooledRenderTexture> output;
  487. static StringID getNodeId() { return "ResolvedSceneDepth"; }
  488. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  489. protected:
  490. /** @copydoc RenderCompositorNode::render */
  491. void render(const RenderCompositorNodeInputs& inputs) override;
  492. /** @copydoc RenderCompositorNode::clear */
  493. void clear() override;
  494. bool mPassThrough = false;
  495. };
  496. /** Builds the hierarchical Z buffer. */
  497. class RCNodeHiZ : public RenderCompositorNode
  498. {
  499. public:
  500. SPtr<PooledRenderTexture> output;
  501. static StringID getNodeId() { return "HiZ"; }
  502. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  503. protected:
  504. /** @copydoc RenderCompositorNode::render */
  505. void render(const RenderCompositorNodeInputs& inputs) override;
  506. /** @copydoc RenderCompositorNode::clear */
  507. void clear() override;
  508. };
  509. /** Renders screen space ambient occlusion. */
  510. class RCNodeSSAO : public RenderCompositorNode
  511. {
  512. public:
  513. SPtr<PooledRenderTexture> output;
  514. static StringID getNodeId() { return "SSAO"; }
  515. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  516. protected:
  517. /** @copydoc RenderCompositorNode::render */
  518. void render(const RenderCompositorNodeInputs& inputs) override;
  519. /** @copydoc RenderCompositorNode::clear */
  520. void clear() override;
  521. };
  522. /** Renders screen space reflections. */
  523. class RCNodeSSR : public RenderCompositorNode
  524. {
  525. public:
  526. SPtr<PooledRenderTexture> output;
  527. ~RCNodeSSR();
  528. static StringID getNodeId() { return "SSR"; }
  529. static SmallVector<StringID, 4> getDependencies(const RendererView& view);
  530. protected:
  531. /** @copydoc RenderCompositorNode::render */
  532. void render(const RenderCompositorNodeInputs& inputs) override;
  533. /** @copydoc RenderCompositorNode::clear */
  534. void clear() override;
  535. /** Cleans up any outputs. */
  536. void deallocOutputs();
  537. SPtr<PooledRenderTexture> mPrevFrame;
  538. };
  539. /** @} */
  540. }}