nCine::RHI::RSX::RsxShaderProgram::RsxSamplerBinding struct

Where one of a stage's samplers takes its texture from.

The two indices are not the same thing: EngineUnit is the texture unit the pipeline binds a texture to, HardwareUnit is the RSX texture unit the compiled shader samples. The Cg emitter tags each sampler with a TEXUNIT<n> semantic taken from the offline reflection, so the two normally agree - but they are resolved separately so a shader that renames or reorders its samplers cannot silently sample the wrong one.

Public variables

const char* Name
std::uint32_t EngineUnit
std::uint32_t HardwareUnit