| 48 | } |
| 49 | |
| 50 | void ShaderObjectData::Store(const Matrix& worldMatrix, const Matrix& prevWorldMatrix, const Rectangle& lightmapUVsArea, const Float3& geometrySize, float perInstanceRandom, float worldDeterminantSign, float lodDitherFactor) |
| 51 | { |
| 52 | Half4 lightmapUVsAreaPacked(*(Float4*)&lightmapUVsArea); |
| 53 | Float2 lightmapUVsAreaPackedAliased = *(Float2*)&lightmapUVsAreaPacked; |
| 54 | Raw[0] = Float4(worldMatrix.M11, worldMatrix.M12, worldMatrix.M13, worldMatrix.M41); |
| 55 | Raw[1] = Float4(worldMatrix.M21, worldMatrix.M22, worldMatrix.M23, worldMatrix.M42); |
| 56 | Raw[2] = Float4(worldMatrix.M31, worldMatrix.M32, worldMatrix.M33, worldMatrix.M43); |
| 57 | Raw[3] = Float4(prevWorldMatrix.M11, prevWorldMatrix.M12, prevWorldMatrix.M13, prevWorldMatrix.M41); |
| 58 | Raw[4] = Float4(prevWorldMatrix.M21, prevWorldMatrix.M22, prevWorldMatrix.M23, prevWorldMatrix.M42); |
| 59 | Raw[5] = Float4(prevWorldMatrix.M31, prevWorldMatrix.M32, prevWorldMatrix.M33, prevWorldMatrix.M43); |
| 60 | Raw[6] = Float4(geometrySize, perInstanceRandom); |
| 61 | Raw[7] = Float4(worldDeterminantSign, lodDitherFactor, lightmapUVsAreaPackedAliased.X, lightmapUVsAreaPackedAliased.Y); |
| 62 | // TODO: pack WorldDeterminantSign and LODDitherFactor |
| 63 | } |
| 64 | |
| 65 | void ShaderObjectData::Load(Matrix& worldMatrix, Matrix& prevWorldMatrix, Rectangle& lightmapUVsArea, Float3& geometrySize, float& perInstanceRandom, float& worldDeterminantSign, float& lodDitherFactor) const |
| 66 | { |
no test coverage detected