Template:ItemBox: Difference between revisionsGive feedback
Restore the icon mask and real masked wear on the lowGraphics path, keeping only texture off, to measure whether the masks affect scroll caching (with help from vergir-bot LLM) |
Add texture=mask, mask-inv and mask-soft switch values (with help from vergir-bot LLM) |
||
| Line 22: | Line 22: | ||
lowGraphics=true is the setting for callers that place dozens of cards on | lowGraphics=true is the setting for callers that place dozens of cards on | ||
one page. It drops the paper texture, because every way of drawing it | one page. It drops the paper texture, because every way of drawing it as a | ||
multiply blends two images together, and WebRender re-rasterises any such | |||
blend on every scrolled frame instead of caching it as a static tile. On the | |||
profiled navbox that blend was the whole cost: dropping it took the render | |||
thread's OpenGL work from ~230 ms/s to ~10 and roughly doubled the frame | |||
rate. The wear and icon masks are clips of a single image, not blends of | |||
two, so they cache once rasterised and are kept at full detail here. | |||
-->{{#vardefine:lowGraphics|{{#ifeq:{{{lowGraphics|}}}|true|itembox-no-texture}}}}<!-- | -->{{#vardefine:lowGraphics|{{#ifeq:{{{lowGraphics|}}}|true|itembox-no-texture}}}}<!-- | ||
| Line 38: | Line 37: | ||
soft - tint stays on top, uniform and lighter, with the name lifted clear | soft - tint stays on top, uniform and lighter, with the name lifted clear | ||
texture handles the paper grain: | texture handles the paper grain: | ||
no - drop it entirely | no - drop it entirely | ||
1/2/3 - one shared paper via the mix-blend overlay | 1/2/3 - one shared paper via the mix-blend overlay (does not cache) | ||
blend / blend1..3 - paper multiplied into the card art | blend / blend1..3 - paper multiplied into the card art (does not cache) | ||
mask / mask-inv / mask-soft - paper used as a mask over a dark tint, a clip | |||
rather than a blend, so it caches while scrolling. mask and mask-inv | |||
-->{{#vardefine:lite|{{#switch:{{{wearMask|}}}|no=itembox-flat-wear|ramp=itembox-ramp-wear|soft=itembox-soft-wear}} {{#ifeq:{{{iconMask|}}}|no|itembox-flat-icon}} {{#switch:{{{texture|}}}|no=itembox-no-texture|1=itembox-force-tex-1|2=itembox-force-tex-2|3=itembox-force-tex-3|blend=itembox-blend-texture|blend1=itembox-blend-texture itembox-blend-tex-1|blend2=itembox-blend-texture itembox-blend-tex-2|blend3=itembox-blend-texture itembox-blend-tex-3}}}}<!-- | differ in whether the grain reads from the paper's brightness or its | ||
alpha; mask-soft is a lighter luminance version. | |||
-->{{#vardefine:lite|{{#switch:{{{wearMask|}}}|no=itembox-flat-wear|ramp=itembox-ramp-wear|soft=itembox-soft-wear}} {{#ifeq:{{{iconMask|}}}|no|itembox-flat-icon}} {{#switch:{{{texture|}}}|no=itembox-no-texture|1=itembox-force-tex-1|2=itembox-force-tex-2|3=itembox-force-tex-3|blend=itembox-blend-texture|blend1=itembox-blend-texture itembox-blend-tex-1|blend2=itembox-blend-texture itembox-blend-tex-2|blend3=itembox-blend-texture itembox-blend-tex-3|mask=itembox-mask-texture itembox-mask-any-texture|mask-inv=itembox-mask-inv-texture itembox-mask-any-texture|mask-soft=itembox-mask-soft-texture itembox-mask-any-texture}}}}<!-- | |||
Links. | Links. | ||