public static float FieldLoadStoreIndirectFloat4() { var localStruct = new StructWithFloat4(); localStruct.Vec4 = new float4(1.0f, 2.0f, 3.0f, 4.0f); return(ConvertToFloat(localStruct.Vec4)); }
public static float SwizzleLoadIndirectXyz() { var localStruct = new StructWithFloat4(); localStruct.Vec4 = new float4(1.0f, 2.0f, 3.0f, 4.0f); var v3 = localStruct.Vec4.zyx; return(v3.x + v3.y * 10 + v3.z * 100); }
public static float SwizzleStoreIndirectXyz() { var localStruct = new StructWithFloat4(); localStruct.Vec4 = new float4(4.0f, 5.0f, 6.0f, 7.0f); localStruct.Vec4.zyx = new float3(1.0f, 2.0f, 3.0f); var v3 = localStruct.Vec4; return(v3.x + v3.y * 10 + v3.z * 100 + v3.w * 1000); }