Class PickingTexture
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Framebuffer for GPU-based object picking using unique object IDs. Rendering the scene into it with PickingTexture.Shader as the replacement shader writes each pixel's node and mesh, which PickingTexture.Read reads back.
public class PickingTexture : FramebufferInheritance
object ← Framebuffer ← PickingTexture
Inherited Members
Framebuffer.FboHandle, Framebuffer.Width, Framebuffer.Height, Framebuffer.HasValidDimensions(), Framebuffer.NumMips, Framebuffer.NumSamples, Framebuffer.Target, Framebuffer.Color, Framebuffer.Depth, Framebuffer.DepthLayers, Framebuffer.ColorFormat, Framebuffer.DepthFormat, Framebuffer.IsColorSrgb, Framebuffer.InitialStatus, Framebuffer.TargetState, Framebuffer.Bind(FramebufferTarget), Framebuffer.ClearColor, Framebuffer.ClearMask, Framebuffer.BindAndClear(FramebufferTarget), Framebuffer.Name, Framebuffer.GLDefaultFramebuffer, Framebuffer.Equals(object?), Framebuffer.GetHashCode(), Framebuffer.Prepare(string, int, int, int, ImageFormat?, ImageFormat?), Framebuffer.Initialize(), Framebuffer.Resize(int, int, int), Framebuffer.Resize(int, int), Framebuffer.ChangeFormat(ImageFormat?, ImageFormat?), Framebuffer.AttachDepthLayer(int), Framebuffer.AttachColorMipLevel(int), Framebuffer.GetMipSize(int), Framebuffer.Delete(), Framebuffer.SetShadowDepthSamplerState(bool), Framebuffer.SetColorSamplerState(TextureMinFilter, TextureMagFilter, RsTextureAddressMode)
Constructors
PickingTexture(RendererContext)
Initializes the picking framebuffer and its shaders.
public PickingTexture(RendererContext rendererContext)Parameters
rendererContext RendererContext
Renderer context for loading shaders.
Properties
DebugShader
Gets the debug shader that visualizes the picking buffer contents on screen.
public Shader DebugShader { get; }Property Value
IsDebugActive
Gets whether the current render mode has activated picking debug visualization.
public bool IsDebugActive { get; }Property Value
bool
Shader
Gets the picking shader used during the picking render pass.
public Shader Shader { get; }Property Value
Methods
SetRenderMode(string)
Updates PickingTexture.IsDebugActive based on whether the current render mode matches the picking shader's supported modes.
public void SetRenderMode(string renderMode)Parameters
renderMode string
Name of the active render mode.

