/Engine/Source/Runtime/Engine/Public/HLSLTree/HLSLTree.h
FRequestedTypeis used when accessing variousFExpressionmethods. A requested type is represented by a concreteShader::FType, along with a bit vector of components. A bit set in this vector means the given component was requested. This allows FExpressions to track access of particular components, which can enable various optimizations. For example, a 'Swizzle' expression may only access the 'Y' component of its input. So it might request a float2 value from its input, but with only the second bit set. This lets the input know that only the 'Y' component is needed for this request. This is turn can be passed down the chain, which can allow certain expressions to be skipped or constant-folded. This is especially useful when dealing with struct types, which are internally represented as a flattened list of components of all fields. In many cases only certain fields of a struct type will be relevant, which can be tracked by setting the bits associated with those fields.
class FRequestedType
TBitArray
RequestedComponents
1 bit per component, a value of 'true' means the specified component is requsted
Shader::FType
Type
The actual type that was requested.