tag

#rendering

15 items (1 guide · 14 fixes)

guides
fixes
26.07.15a
"A uniform font-size declaration still triggers glyph corruption"

SUPERSEDED: the font-size-declaration theory below was owner-settled (26.07.22) to be a CAPTURE-PATH artifact, not a live-render bug, and the mechanism was later traced to the root panel's fractional scale. Never strip font-size or letter-spacing from a shipping stylesheet to 'fix' captures. See camera-screenshot-cannot-verify-fonts.

26.07.15a
"An MCP camera_screenshot cannot verify font faces or text legibility"

Glyph-block corruption in an MCP camera_screenshot is a capture-path artifact, not a live-render bug. The same UI renders text perfectly on the real screen. You cannot screenshot your way out of it: the requested width/height does not change the UI render scale, and sub-native requests crop the top-left. Verify geometry from a capture, never text fidelity; font-face and legibility are owner-eyeball checks.

26.07.15a
"border-style: solid is a parse error that kills the whole stylesheet"

border-style: solid is a parse error in s&box scss. The invalid property aborts the whole stylesheet, collapsing the panel to zero size -- invisible, not just unbordered.

26.07.08e
"Disabling per-instance shadows on ModelRenderer"

ModelRenderer.CastShadows doesn't exist as a settable property: use renderer.SceneObject.Flags.CastShadows instead.

26.07.08e
"First-person hide: use the viewer tag, not RenderType"

RenderType.Off only kills the shadow, not the draw: use Tags.Set("viewer", true) on the visual root plus camera RenderExcludeTags for correct first-person body hiding.

26.07.08e
"Glyph corruption (text renders as solid blocks) is also text-count dependent"

SUPERSEDED: the text-run-count theory below was owner-settled (26.07.22) to be a CAPTURE-PATH artifact, not a live-render bug, and the mechanism was later traced to the root panel's fractional scale. Do not trim text runs to 'fix' glyph blocks in a capture.

26.07.08e
"Hand-rolled visual smoother fights engine FixedUpdateInterpolation: 50 Hz model flicker"

A per-frame visual-smoothing offset computed from raw fixed-tick state double-smooths against the engine's built-in FixedUpdateInterpolation, producing a 50 Hz sawtooth that reads as model flicker on stepped terrain: delete the manual smoother or compute against interpolated state.

26.07.08e
"ModelRenderer.Tint on flat-color vmats causes purple/black corruption"

Per-instance Tint on a flat-color vmat (white PNG + g_vColorTint) rotates hue or crushes random instances to black: use scale/yaw jitter instead.

26.07.08e
"Razor RenderFragment flex rows with gap collapse on top of each other"

Thin flex rows with a gap inside a Razor RenderFragment expression under-measure their height and pile on top of each other. The same markup renders fine in the component's main root.

26.07.15a
"RenderExcludeTags on a tagged parent culls all child renderers too"

GameObject.Tags inherit to all descendants, so a CameraComponent.RenderExcludeTags exclusion on a tagged object culls every child renderer too: cosmetics attached as children silently vanish.

26.07.22
"s&box composites UI alpha in linear space, so low-alpha whites render too light"

s&box blends UI alpha in linear color space while browser-authored mockups blend in sRGB, so every low-alpha white/light surface renders substantially lighter in-engine than the same rgba() value looks in a browser. Opaque colors match bit-for-bit: the divergence is isolated to the alpha compositing step and worst at low alpha. Match target rendered pixels, never authored alpha numbers.

26.07.22
"ScreenPanel.ZIndex defaults to 100, and tied roots have no paint order"

ScreenPanel.ZIndex defaults to 100 (not 0), so any ScreenPanel that never sets a tier collides with the tier most projects author their modals at, and two roots with equal ZIndex have no defined paint order at all. Cross-root compositing is a stable OrderBy over an unordered HashSet, so tied roots keep an enumeration order that matches creation on a fresh boot but re-rolls on any enable/disable interleave or editor hotload. A full-screen surface can paint a perfectly healthy tree and still be invisible under a tied root.

26.07.08e
"Three ways Razor text is in the DOM but invisible on screen"

s&box Razor panels have three distinct 'text is there but not on screen' failure modes (long-line clipping, narrow-segment overflow, and inline expression resolution), each with a different structural fix.

26.07.08e
"Too many font-size declarations (or too much text) corrupt UI glyph rendering"

SUPERSEDED: the font-size-declaration-count theory below was owner-settled (26.07.22) to be a CAPTURE-PATH artifact, not a real render bug. Panels with these exact font-size declarations render pin-sharp on the physical screen. Never strip font-size from a shipping stylesheet to 'fix' captures. See camera-screenshot-cannot-verify-fonts.

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord