Template:ItemBox: Difference between revisions

Jump to navigation Jump to search
Vergir (talk | contribs)
Add optional wearMask, iconMask and texture parameters so callers rendering many cards can drop per-card mask passes and the backdrop read (with help from vergir-bot LLM)
Vergir (talk | contribs)
wearMask now takes no or ramp, for the two ways of dropping the wear mask without washing out the card (with help from vergir-bot LLM)
Line 24: Line 24:
     masked layer costs the GPU an extra render pass per card and the texture
     masked layer costs the GPU an extra render pass per card and the texture
     costs a backdrop read, so dropping them buys frames at the cost of detail.
     costs a backdrop read, so dropping them buys frames at the cost of detail.
     wearMask=no keeps the per-tier tint but loses the worn paper edge.
     wearMask=no keeps the tier tint on the card stock but loses the worn edge;
-->{{#vardefine:lite|{{#ifeq:{{{wearMask|}}}|no|itembox-flat-wear}} {{#ifeq:{{{iconMask|}}}|no|itembox-flat-icon}} {{#ifeq:{{{texture|}}}|no|itembox-no-texture}}}}<!--
    wearMask=ramp instead fades the tint in from the card's edges.
-->{{#vardefine:lite|{{#switch:{{{wearMask|}}}|no=itembox-flat-wear|ramp=itembox-ramp-wear}} {{#ifeq:{{{iconMask|}}}|no|itembox-flat-icon}} {{#ifeq:{{{texture|}}}|no|itembox-no-texture}}}}<!--


     Links.
     Links.