protected override void InitializeInner() { _materialsProvider = new UvMaterialProvider(); DeviceContextHolder.Set(_materialsProvider); _materialsProvider.SetKn5(_kn5); _carNode = (Kn5RenderableList)Kn5Converter.Convert(_kn5.RootNode, DeviceContextHolder); }
private void LoadAndAdjustKn5() { _materialsProvider = new DepthMaterialProvider(); _texturesProvider = new TexturesProvider(); DeviceContextHolder.Set(_materialsProvider); DeviceContextHolder.Set(_texturesProvider); _materialsProvider.SetKn5(_kn5); _carNode = (Kn5RenderableList)Kn5Converter.Convert(_kn5.RootNode, DeviceContextHolder); _scene.Add(_carNode); _carNode.UpdateBoundingBox(); _carNode.LocalMatrix = Matrix.Translation(0, UpDelta - (_carNode.BoundingBox?.Minimum.Y ?? 0f), 0) * _carNode.LocalMatrix; _scene.UpdateBoundingBox(); }
protected override void InitializeInner() { _materialsProvider = CreateMaterialsProvider(); DeviceContextHolder.Set(_materialsProvider); _materialsProvider.SetKn5(_kn5); RootNode = (RenderableList)Kn5Converter.Convert(_kn5.RootNode, DeviceContextHolder); _buffer0 = TargetResourceTexture.Create(Format.R8G8B8A8_UNorm); _buffer1 = TargetResourceTexture.Create(Format.R8G8B8A8_UNorm); }