MCPcopy Create free account
hub / github.com/Unity-Technologies/HLSLcc / TranslateDynamicComponentSelection

Method TranslateDynamicComponentSelection

src/toGLSLInstruction.cpp:1421–1452  ·  view source on GitHub ↗

Handle cases where vector components are accessed with dynamic index ([] notation). A bit ugly hack because compiled HLSL uses byte offsets to access data in structs => we are converting the offset back to vector component index in runtime => calculating stuff back and forth. TODO: Would be better to eliminate the offset calculation ops and use indexes straight on. Could be tricky though...

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

bcatcstrFunction · 0.85
HaveUnsignedTypesFunction · 0.85
bformataFunction · 0.85

Tested by

no test coverage detected