MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Store

Method Store

Source/Engine/Renderer/RenderList.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void 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
65void ShaderObjectData::Load(Matrix& worldMatrix, Matrix& prevWorldMatrix, Rectangle& lightmapUVsArea, Float3& geometrySize, float& perInstanceRandom, float& worldDeterminantSign, float& lodDitherFactor) const
66{

Callers 7

BuildObjectsBufferMethod · 0.45
DrawInstanceMethod · 0.45
UpdateTextureMethod · 0.45
TransformMethod · 0.45
ConvertStbMethod · 0.45
ResizeStbMethod · 0.45

Calls 1

Float4Class · 0.85

Tested by

no test coverage detected