RenderSettings class final

Scene-wide shading knobs that are not per-material.

One value passed to Renderer.render, and nothing here is state. A caller builds the settings for a frame and hands them over; the renderer keeps no copy of them, which is what lets a debug view be switched on for one frame and off for the next without anything having to be switched back. What does cross a frame boundary is measured rather than remembered from here — the exposure meter, and what it answers is autoExposure's to explain. copyWith is how a frame is derived from the last one — and every field belongs in it, which test/render_settings_test.dart is there to insist on, having caught seven that did not.

That first line used to sit at the top of the file, above ReflectionSettings and separated from this class by four others — so the most-used type in the public API had no doc comment at all, and the summary written for it introduced something else.

Constructors

RenderSettings({double specular = 1.0, double exposure = defaultExposure, bool wireframe = false, bool backfaceCulling = true, bool batchIdenticalDraws = false, DebugDrawOptions debug = const DebugDrawOptions(), List<SceneNode> highlighted = const <SceneNode>[], bool tonemap = true, TonemapCurve tonemapCurve = TonemapCurve.neutral, AntiAliasSettings antiAlias = const AntiAliasSettings(), BloomSettings bloom = const BloomSettings(), LookSettings look = const LookSettings(), ShadowSettings shadows = const ShadowSettings(), bool surfaceBuffer = false, bool showSurfaceBuffer = false, bool showShadowMap = false, bool showStaticShadowMap = false, bool showPointShadowDebug = false, ReflectionSettings reflections = const ReflectionSettings(), AmbientOcclusionSettings ambientOcclusion = const AmbientOcclusionSettings(), ContactShadowSettings contactShadows = const ContactShadowSettings(), FogSettings fog = const FogSettings(), SkySettings sky = const SkySettings(), int anisotropy = 1, double lightFadeBand = 0.0, AutoExposureSettings autoExposure = const AutoExposureSettings(), XraySettings xray = const XraySettings(), Set<String> disabledPasses = const <String>{}, double renderScale = 1.0, LightShaftSettings lightShafts = const LightShaftSettings(), DepthOfFieldSettings depthOfField = const DepthOfFieldSettings(), ViewportShadingSettings viewportShading = const ViewportShadingSettings()})
const

Properties

ambientOcclusion → AmbientOcclusionSettings
Darkens the ambient term where a surface cannot see the sky.
final
anisotropy → int
Taps a model's texture samplers may take along a foreshortened axis.
final
antiAlias → AntiAliasSettings
Edges smoothed after the composite — see AntiAliasSettings.
final
autoExposure → AutoExposureSettings
Exposure decided by the frame's own brightness — see AutoExposureSettings.
final
backfaceCulling → bool
final
batchIdenticalDraws → bool
Whether a run of identical opaque draws is merged into one instanced call — gfx-67n.
final
bloom → BloomSettings
final
contactShadows → ContactShadowSettings
The short march toward the light — gfx-76n.
final
debug → DebugDrawOptions
Which debug overlays to draw on top of the scene.
final
depthOfField → DepthOfFieldSettings
gfx-34n's lens, which decides what is sharp and by how much the rest is not.
final
disabledPasses → Set<String>
Frame-graph nodes to leave out of this frame, by name — gfx-37n.
final
exposure → double
Linear multiplier applied before tone mapping.
final
fog → FogSettings
final
hashCode → int
The hash code for this object.
no setterinherited
highlighted → List<SceneNode>
Nodes to outline, typically whatever picking last selected.
final
lightFadeBand → double
How wide a ramp sits at the edge of a draw's own light list — gfx-05n.
final
lightShafts → LightShaftSettings
gfx-33n's volumetric shafts through the directional shadow map.
final
look → LookSettings
Grading, vignette, grain and dispersion, applied inside the composite. Neutral by default — see LookSettings.
final
needsSurfaceBuffer → bool
Whether the scene pass should write the surface buffer at all.
no setter
reflections → ReflectionSettings
final
renderScale → double
How much of the asked-for resolution the frame is actually drawn at — gfx-35n. 1 is all of it, and is the default.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shadows → ShadowSettings
final
showPointShadowDebug → bool
Paints the point shadow's penumbra estimate into the surface buffer, and shows that instead of the lit image.
final
showShadowMap → bool
Composites the shadow map instead of the scene.
final
showStaticShadowMap → bool
Composites the static cube atlas instead of the scene.
final
showSurfaceBuffer → bool
Composites the surface buffer instead of the scene.
final
sky → SkySettings
What is behind everything, when there is anything.
final
specular → double
final
surfaceBuffer → bool
Whether the scene pass writes its second attachment: world-space normal and depth, for a screen-space effect to read.
final
tonemap → bool
Whether the composite pass applies the tone curve.
final
tonemapCurve → TonemapCurve
Which curve tonemap applies — gfx-17n's own row.
final
viewportShading → ViewportShadingSettings
gfx-43n/44n/45n's shading read out of the surface buffer rather than out of the materials.
final
wireframe → bool
Draws the scene's triangles as lines.
final
xray → XraySettings
Silhouettes of the nodes on a layer, drawn where something hides them.
final

Methods

copyWith({double? specular, double? exposure, bool? wireframe, bool? backfaceCulling, bool? batchIdenticalDraws, DebugDrawOptions? debug, List<SceneNode>? highlighted, bool? tonemap, TonemapCurve? tonemapCurve, AntiAliasSettings? antiAlias, BloomSettings? bloom, LookSettings? look, ShadowSettings? shadows, bool? surfaceBuffer, bool? showSurfaceBuffer, bool? showShadowMap, bool? showStaticShadowMap, bool? showPointShadowDebug, ReflectionSettings? reflections, AmbientOcclusionSettings? ambientOcclusion, ContactShadowSettings? contactShadows, FogSettings? fog, SkySettings? sky, int? anisotropy, double? lightFadeBand, AutoExposureSettings? autoExposure, XraySettings? xray, Set<String>? disabledPasses, double? renderScale, LightShaftSettings? lightShafts, DepthOfFieldSettings? depthOfField, ViewportShadingSettings? viewportShading}) → RenderSettings
This one with some fields replaced.
forMeasurement() → RenderSettings
These settings, arranged so the frame's bytes are the numbers the material wrote rather than a photograph of them — gfx-40n.
forStereo() → RenderSettings
These settings with the effects a stereo pair cannot have taken out.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

probePassName(int index) → String
What a reflection probe's pass is called, for probe index.

Constants

batchRunMinimum → const int
How many identical draws it takes before merging them is worth a pipeline switch on either side of the batch.
defaultExposure → const double
What exposure is when nothing says otherwise — named, because the renderer reports this as the exposure of a frame it has not drawn yet.
passOrder → const List<String>
Every pass the engine registers, in the order it registers them — gfx-19n.
pixelAlteringPasses → const Set<String>
Node names a measurement frame leaves out — see forMeasurement.
undisablePasses → const Set<String>
The three names disabledPasses refuses — gfx-19n publishing what the graph already enforced.