mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
SetAlphaGradient(index, gradient), ClearAlphaGradient and HasAlphaGradient, what ScrollBox's SetEdgeFadeLength calls. As probed on retail: index 0 fades in from the left and top edges, index 1 from the right and bottom, and the fade shows only while the frame clips its children, its own regions included. Each index is one texture stage over the draw: a 2x2 ramp texture, filtered and clamped, whose alpha multiplies in (preset 1). Coordinates come from the camera-space position through a projected texture matrix that maps clip space to the screen and then to the ramps, reloaded on every projection and viewport set while a gradient draws. Textures, text (drawn in pixels under its own projection) and clipped draws fade on the same screen spot. ClipChildren now batches regions by nearest clipping frame and nearest frame with a gradient; Texture::Mask takes its stages above the gradient's. D3D only; a desaturated or masked texture does not fade. DesaturateHierarchy(desaturation [, excludeRoot]) sets the desaturation of every texture of the frame and of the frames under it, through Texture::Desaturation.