void ReconstructRawVertex(lightmap_vertex_buffer_bucket_block buffer_bucket, int stream_source, Render.VertexBufferInterface.StreamReader stream_reader) { LowLevel.Math.real_quaternion quat = new LowLevel.Math.real_quaternion(); // The following LM vertex sources only have one element, so we can call this here stream_reader.GetStreamedElement(0, ref quat); if (buffer_bucket.Flags.Test(k_bucket_flags_IncDir) && stream_source == 0) { PrimaryLightmapIncidentDirection.I = quat.Vector.I; PrimaryLightmapIncidentDirection.J = quat.Vector.J; PrimaryLightmapIncidentDirection.K = quat.Vector.K; } else if (buffer_bucket.Flags.Test(k_bucket_flags_Color) && stream_source == 1) { // alpha is quad.W, which LM color doesn't use PrimaryLightmapColor.R = quat.Vector.I; PrimaryLightmapColor.G = quat.Vector.J; PrimaryLightmapColor.B = quat.Vector.K; } }