class
RenderTargetAsset
A texture the renderer writes instead of the cook — UE's TextureRenderTarget2D. The .mrt file holds only the size and the clear colour; the image is created at CreateGPU and filled by whatever captures into it (a SceneCaptureComponent naming this asset). It IS a TextureAsset, so a material's Texture Sample slot, a UI image or any other texture consumer binds it without knowing the difference, and the material's descriptor set stays valid across captures because the image object never changes — only its contents do.
- Module
- AssetSystem
- Header
#include "AssetSystem/Assets/RenderTargetAsset.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
RenderTargetAsset() | RenderTargetAsset | |
~RenderTargetAsset() override | ~RenderTargetAsset |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | Load | |
void | Unload | |
bool | CreateGPU | |
void | DestroyGPU | |
bool | CanAdoptLoadedState | |
bool | SaveToFile | |
uint32_t | GetTargetWidth | |
uint32_t | GetTargetHeight | |
void | SetTargetSize | |
const Vec4& | GetClearColor | |
void | SetClearColor | |
Ref<Image2D> | GetTargetImage | The image captures blit into; null until CreateGPU. |
uint32_t | GetWriteCount | How many captures have written the target since it was created — a consumer that must not sample an unwritten target reads this. |
void | NoteWritten | |
uint64_t | EstimatedMemoryUsage |
Function details
RenderTargetAsset
C++
RenderTargetAsset()~RenderTargetAsset
C++
~RenderTargetAsset() overrideLoad
C++
bool Load(const std::string& path) overrideUnload
C++
void Unload() overrideCreateGPU
C++
bool CreateGPU(const GPUContext& ctx) overrideDestroyGPU
C++
void DestroyGPU() overrideCanAdoptLoadedState
C++
bool CanAdoptLoadedState() const overrideSaveToFile
C++
bool SaveToFile(const std::string& path) constGetTargetWidth
C++
uint32_t GetTargetWidth() constGetTargetHeight
C++
uint32_t GetTargetHeight() constSetTargetSize
C++
void SetTargetSize(uint32_t width, uint32_t height)GetClearColor
C++
const Vec4& GetClearColor() constSetClearColor
C++
void SetClearColor(const Vec4& color)GetTargetImage
C++
Ref<Image2D> GetTargetImage() constThe image captures blit into; null until CreateGPU.
GetWriteCount
C++
uint32_t GetWriteCount() constHow many captures have written the target since it was created — a consumer that must not sample an unwritten target reads this.
NoteWritten
C++
void NoteWritten()EstimatedMemoryUsage
C++
uint64_t EstimatedMemoryUsage() const overrideGenerated from AssetSystem/Assets/RenderTargetAsset.h via assetsystem.json · Nov 4, 2026Version 1.0.0