Skip to content

Material UV transforms

AnvilMaterialsApplies toRRSWS

A UVTransform property stores eight floats and three bytes. Its template binding identifies the material constant-buffer rows used to transform (u,v,1). The census contains 21,928 UV properties on 6,166 of the 13,579 stored Materials. Proven · all stored UV-property records

UVTransform property payload47 bytes68% known

Begins after the sixteen-byte Material property header.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x08u64object identityObserved
0x84u32 = 0xC52E2125repeated classProven
0xC4f32U scaleObserved
0x104f32V scaleObserved
0x144f32U translationObserved
0x184f32V translationObserved
0x1C4f32U translation speedInferredname and animated-value correlation; time rule unresolved
0x204f32V translation speedInferredname and animated-value correlation; time rule unresolved
0x244f32rotation in radiansObserved
0x284f32rotation speedInferredno resident animated-rotation case
0x2C1u8AnimateTranslation candidateInferred1 on 133 properties; correlated with speed fields
0x2D1u8AnimateRotation candidateInferred1 on eight properties
0x2E1u8unnamed byteUnknown1 on four properties; otherwise 0

Eleven distinct runtime matrices match stored static float combinations to five significant digits, each matching one combination. Five have rotation only and uniform scale; six have translation only, including nonuniform scale. They establish unscaled signed translation in the third column and a final row (0,0,1,0). Observed · world-memory matrix comparison

For the measured uniform-scale rotated cases, rows are (s*cos(t),-s*sin(t),0,0) and (s*sin(t),s*cos(t),0,0). Translation-only rows are (su,0,tu,0) and (0,sv,tv,0). These observations do not distinguish S*R from R*S when rotation and nonuniform scale occur together. Observed · eleven matrices

The corpus has 32 distinct static combinations with unequal scales and nonzero rotation and 45 with rotation plus translation, but none is identified among the sampled resident matrices. Extrapolating a complete composition order is therefore an inference. Observed · corpus/snapshot comparison Inferred · general composition

Animated examples have translations with signs and zero components matching the stored speed directions, but a single common elapsed-time multiplier does not explain them. Their clock, wrapping and update timing are unresolved. Observed · animated runtime matrices Unknown · time rule

How are nonuniform scale, rotation and time combined?

The static special cases are established. Their general product order, translation combined with rotation, animated time term and third byte remain unresolved. Unknown

only in SWS

Each diffuse slot of an SKGenericMaterial stores a scale, an offset and a rotation in degrees (see the slot block). The setter converts the degrees to radians in double precision (multiplying by pi / 180), rounds that to f32, and takes the f32 cosine and sine. With scale (sx, sy), offset (ox, oy) and angle a, the two matrix rows it writes are (sx·cos a, −sx·sin a, ox) and (sy·sin a, sy·cos a, oy). A texture coordinate is therefore S · R(a) · uv + o: the rotation acts about the origin first, then the scale, then the offset. Proven · the engine’s own setter, run on its own inputs

The engine’s setter (0xCD7590 of the recorded build) was run in a host that mapped the executable and applied its relocations by hand; its 66 output matrix words equal the formula above exactly. The full pixel program of a material rotated by 26.27 degrees, run on a reference rasteriser with patterned textures, gave 105 colour values equal to the formula. The full original vertex program, run for a street pavement material with scale 2 by 1, gave the same derived coordinates as the formula in 70 of 70 checks, with identity and altered-rotation controls changing the outputs as expected. Proven · the engine’s own code, run on constructed inputs

Materials with a nonzero rotation on a populated slot occur in every one of the six levels. Observed