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

Method PrepareCache

Source/Engine/Graphics/RenderView.cpp:65–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void RenderView::PrepareCache(const RenderContext& renderContext, float width, float height, const Float2& temporalAAJitter, const RenderView* mainView)
66{
67 // The same format used by the Flax common shaders and postFx materials
68 ViewInfo = Float4(1.0f / Projection.M11, 1.0f / Projection.M22, Far / (Far - Near), (-Far * Near) / (Far - Near) / Far);
69 ScreenSize = Float4(width, height, 1.0f / width, 1.0f / height);
70
71 TemporalAAJitter.Z = TemporalAAJitter.X;
72 TemporalAAJitter.W = TemporalAAJitter.Y;
73 TemporalAAJitter.X = temporalAAJitter.X;
74 TemporalAAJitter.Y = temporalAAJitter.Y;
75
76 WorldPosition = Origin + Position;
77
78 ModelLODDistanceFactorSqrt = ModelLODDistanceFactor * ModelLODDistanceFactor;
79
80 // Setup main view render info
81 if (!mainView)
82 mainView = this;
83 MainViewProjection = mainView->ViewProjection();
84 MainScreenSize = mainView->ScreenSize;
85}
86
87void RenderView::UpdateCachedData()
88{

Callers 2

RenderMethod · 0.80
SetupLightMethod · 0.80

Calls 1

Float4Class · 0.85

Tested by

no test coverage detected