| 63 | } |
| 64 | |
| 65 | void 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 | |
| 87 | void RenderView::UpdateCachedData() |
| 88 | { |
no test coverage detected