Skip to content

Texture Transparency Library

Olexandr edited this page Aug 23, 2026 · 11 revisions

Library for ZZMI for making transparent or semi-transparent materials

Important

This library included in ZZMI Package, avoid duplicates of it in Mods folder.

Main transparency part

Example

[TextureOverrideCharacterComponentPart]
hash = 0a1b2c3d
match_first_index = 0
match_index_count = 123

ib = ResourceCharacterComponentPartIB

; Regular part
DrawIndexed = 123, 0, 0

; Transparent part
; DrawIndexed = 321, 123, 0
$\TTL\_1 = 321
$\TTL\_2 = 123
run = CommandList\TTL\Draw

Required

  • run = CommandList\TTL\Draw
    • replaces DrawIndexed call, aka DrawIndexed = <indices count>, <indices offset>, <vertex offset>
  • $\TTL\_1 - indices count
  • $\TTL\_2 - indices offset

Optional

  • $\TTL\_3 - vertex offset
    • by default: 0
  • Resource\TTL\TransparencyTex - mask, determines which parts of mesh will be affected
  • $\TTL\alpha - determines transparency intensity
    • by default: 0.5
    • valid value range: 0.0 -> 1.0
  • $\TTL\mask_channel - determines which channel of mask will be used
    • by default: 0 == Red channel
    • valid values are: 0,1,2,3 == R,G,B,A
  • $\TTL\mask_invert - inverts color channel logic
    • 0 - default, 1 - inverted
    • default: 0 -> 255 increases transparency

UI Placement resources

Generates buffer with object RT boundaries

Example

[TextureOverrideCharacterComponentPart]
hash = 0a1b2c3d
match_first_index = 0
match_index_count = 123

ib = ResourceCharacterComponentPartIB

run = CommandList\TTL\RequestUIPlacement
; Resource or any shader slot
ResourceMyPlacement = copy Resource\TTL\UIPlacement

[ResourceMyPlacement]
type = Buffer
format = R32G32B32A32_FLOAT
array = 2

Data layout

[ResourceUIPlacement]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 2
  • [0].x - is valid, 0 or 1
  • [0].y - ABI version
  • [1]
    • x y - screen x y position
    • z w - width height

Clone this wiki locally