MCPcopy Create free account
hub / github.com/ValveSoftware/ToGL / FixGLSLSwizzle

Method FixGLSLSwizzle

togl/linuxwin/dx9asmtogl2.cpp:1008–1060  ·  view source on GitHub ↗

GLSL needs the # of src masks to match the dest write mask. So this: r0.xy = r1 + r2; becomes: r0.xy = r1.xy + r2.xy; Also, and this is the trickier one: GLSL reads the source registers from their first component on whereas D3D reads them as referenced in the dest register mask! So this code in D3D: r0.yz = c0.x + c1.wxyz Really means: r0.y = c0.x + c1.x r0.z = c0.x + c1.y So we translate it t

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

GetNumSwizzleComponentsFunction · 0.85
GetSwizzleComponentFunction · 0.85

Tested by

no test coverage detected