Class PassBuilder¶
Namespace: Apogee.Rendering.Graph
Assembly: Apogee.Rendering.dll
What a pass declares while the graph is built: how it uses each image and buffer. The graph derives culling, lifetimes and barriers from this. Every image method takes an optional
public sealed class PassBuilder
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Methods¶
CopyFrom(ImageHandle, SubresourceRange?)¶
public ImageHandle CopyFrom(ImageHandle image, SubresourceRange? range = null)
Parameters¶
image ImageHandle
range SubresourceRange?
Returns¶
CopyFrom(BufferHandle)¶
public BufferHandle CopyFrom(BufferHandle buffer)
Parameters¶
buffer BufferHandle
Returns¶
CopyTo(ImageHandle, SubresourceRange?)¶
public ImageHandle CopyTo(ImageHandle image, SubresourceRange? range = null)
Parameters¶
image ImageHandle
range SubresourceRange?
Returns¶
CopyTo(BufferHandle)¶
public BufferHandle CopyTo(BufferHandle buffer)
Parameters¶
buffer BufferHandle
Returns¶
Execute(Action<PassContext>)¶
The commands of the pass. For a graphics pass with attachments, rendering is already begun and ends after the callback.
public void Execute(Action<PassContext> execute)
Parameters¶
execute Action<PassContext>
NoCull()¶
The pass does something the graph cannot see (writes to memory it does not track, to the screen), so it is never culled.
public void NoCull()
Read(BufferHandle)¶
Reads the buffer in shaders (through its address).
public BufferHandle Read(BufferHandle buffer)
Parameters¶
buffer BufferHandle
Returns¶
ReadDepth(ImageHandle, SubresourceRange?)¶
Depth-tests against the image without writing it, and lets shaders sample it.
public ImageHandle ReadDepth(ImageHandle image, SubresourceRange? range = null)
Parameters¶
image ImageHandle
range SubresourceRange?
Returns¶
ReadIndirect(BufferHandle)¶
Reads the buffer as the arguments of an indirect dispatch or draw (
public BufferHandle ReadIndirect(BufferHandle buffer)
Parameters¶
buffer BufferHandle
Returns¶
ReadSampled(ImageHandle, SubresourceRange?)¶
Samples the image in shaders (it ends in
public ImageHandle ReadSampled(ImageHandle image, SubresourceRange? range = null)
Parameters¶
image ImageHandle
range SubresourceRange?
Returns¶
ReadWrite(BufferHandle)¶
Reads and writes the buffer in shaders: the pass needs what was in it before (a counter it adds to, a list it appends to).
public BufferHandle ReadWrite(BufferHandle buffer)
Parameters¶
buffer BufferHandle
Returns¶
ReadWriteStorage(ImageHandle, SubresourceRange?)¶
Reads and writes the image as a storage image: the pass needs what was in it before.
public ImageHandle ReadWriteStorage(ImageHandle image, SubresourceRange? range = null)
Parameters¶
image ImageHandle
range SubresourceRange?
Returns¶
Write(BufferHandle)¶
Writes the whole buffer in shaders: what was in it before is not needed.
public BufferHandle Write(BufferHandle buffer)
Parameters¶
buffer BufferHandle
Returns¶
WriteColor(ImageHandle, Vector4?, SubresourceRange?)¶
Renders into the image as a color attachment; the graph begins and ends the rendering. With clear the old contents are discarded, otherwise they are loaded. The attachment is one mip level
(a range must say which when the image has several), and its size is that of the level.
public ImageHandle WriteColor(ImageHandle image, Vector4? clear = null, SubresourceRange? range = null)
Parameters¶
image ImageHandle
clear Vector4?
range SubresourceRange?
Returns¶
WriteDepth(ImageHandle, float?, SubresourceRange?)¶
Renders into the image as the depth attachment. The clear value is reverse-Z's far plane, 0, unless given; null loads the old contents.
public ImageHandle WriteDepth(ImageHandle image, float? clear = 0, SubresourceRange? range = null)
Parameters¶
image ImageHandle
clear float?
range SubresourceRange?
Returns¶
WriteStorage(ImageHandle, SubresourceRange?)¶
Writes the whole image as a storage image (compute shaders, or fragment shaders): what was in it before is not needed.
public ImageHandle WriteStorage(ImageHandle image, SubresourceRange? range = null)
Parameters¶
image ImageHandle
range SubresourceRange?