Skip to main content

RenderTexture.DiscardContents(boolean discardColor, boolean discardDepth)

Hint the GPU driver that the contents of the RenderTexture will not be used.

Parameters:

NameTypeDescription
discardColorbooleanShould the colour buffer be discarded?
discardDepthbooleanShould the depth buffer be discarded?

Usage

---@type RenderTexture
local rendertexture;

---@type boolean
local discardColor;

---@type boolean
local discardDepth;


rendertexture.DiscardContents(discardColor, discardDepth)