Template:ItemBox: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Use per-item paper for the lowGraphics blend rather than forcing one, now that the blend caches regardless of variety (with help from vergir-bot LLM) |
Ship texture=no in lowGraphics: every paper approach reintroduces an image blend that WebRender re-rasterises each frame, so no texture is the only fast option (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. | one page. It drops the paper texture entirely, because every way of drawing | ||
it multiplies two images together, and WebRender re-rasterises and re-uploads | |||
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 tint also becomes a gradient and the icon mask is | |||
dropped, both cheaper per card, though the texture is the change that matters. | |||
-->{{#vardefine:lowGraphics|{{#ifeq:{{{lowGraphics|}}}|true|itembox-ramp-wear itembox-flat-icon itembox-no-texture}}}}<!-- | |||
-->{{#vardefine:lowGraphics|{{#ifeq:{{{lowGraphics|}}}|true|itembox-ramp-wear itembox-flat-icon itembox- | |||
The same layers individually, for testing combinations or overriding the | The same layers individually, for testing combinations or overriding the | ||
| Line 39: | 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 (the only option that caches while scrolling) | ||
1/2/3 - one shared paper via the mix-blend overlay | 1/2/3 - one shared paper via the mix-blend overlay | ||
blend / blend1..3 - paper multiplied into the card art | blend / blend1..3 - paper multiplied into the card art. Both of these | ||
multiply two images and so are re-rasterised every scrolled frame; | |||
they are fine for a handful of cards but not for a full page. | |||
-->{{#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}}}}<!-- | -->{{#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}}}}<!-- | ||