Interface RenderTarget
- All Superinterfaces:
GpuSurface,ReadableSurface
GpuSurface so it still
composites into the 2D scene via Canvas.drawSurface(limn.graphics.GpuSurface, float, float, float, float) and
is released via Scene.disposeLater(limn.graphics.GpuSurface). Created through
Graphics3D. Sizes are in device pixels.
Color space: the target's contents are linear light,
premultiplied alpha, scene-referred, never display-referred. Every
program that writes color into one is held to that: authored sRGB values are
decoded to linear before they are written, so blending and the MSAA resolve
accumulate light rather than encoded pixels. The display transform
(exposure, ACES tonemap, sRGB encode) runs exactly once, in the 2D composite,
when the target is drawn via drawSurface.
That colour space is also why reading one back is two operations rather
than one: ReadableSurface is extended here (every render target can
be read), and its two methods return the scene-referred contents and the
display-referred picture respectively. exposure() belongs to the
second and must not be applied to the first.
-
Method Summary
Modifier and TypeMethodDescriptiondefault floatexposure()The exposure the most recent pass into this target was given (RenderPass.exposure(float)), 1 before any pass ran.intsamples()MSAA sample count actually allocated (1 = no multisampling).stats()GPU memory this target owns (color/depth attachments), for the perf monitor.Methods inherited from interface limn.graphics.GpuSurface
dispose, heightPx, resize, widthPxMethods inherited from interface limn.graphics.ReadableSurface
readDisplayReferred, readDisplayReferred, readSceneReferred, readSceneReferred
-
Method Details
-
samples
int samples()MSAA sample count actually allocated (1 = no multisampling). -
exposure
default float exposure()The exposure the most recent pass into this target was given (RenderPass.exposure(float)), 1 before any pass ran. The 2D composite's display transform applies it when this target is drawn; exposure belongs to the display transform, not to the scene-referred pixels. -
stats
RenderStats stats()GPU memory this target owns (color/depth attachments), for the perf monitor.
-