Esempio n. 1
0
        internal MyMaterialMergeGroup(MyMeshTableSRV meshTable, MyMeshMaterialId matId, int index)
        {
            m_mergeGroup     = new MyMergeInstancing(meshTable);
            m_rootMaterialRK = MyMeshMaterials1.Table[matId.Index].RepresentationKey;
            m_index          = index;

            m_actors = new HashSet <MyActor>();
        }
Esempio n. 2
0
        internal MyMaterialMergeGroup(MyMeshTableSRV meshTable, MyMeshMaterialId matId, int index)
        {
            m_mergeGroup     = new MyMergeInstancing(meshTable);
            m_rootMaterialRK = MyMeshMaterials1.Table[matId.Index].RepresentationKey;
            Index            = index;

            m_actors       = new Dictionary <uint, MyActor>();
            m_actorIndices = new Dictionary <MyActor, int>();
        }
Esempio n. 3
0
        internal static unsafe void InitSubsystems()
        {
            InitializeBlendStates();
            InitializeRasterizerStates();
            InitilizeSamplerStates();

            MyCommon.Init();
            MyPipelineStates.Init();
            MyTextures.Init();
            MyVertexLayouts.Init();
            MyShaders.Init();
            MyRwTextures.Init();
            MyHwBuffers.Init();
            MyMeshes.Init();
            MyMeshTableSRV.Init();
            MyMergeInstancing.Init();
            MyGeometryRenderer.Init();
            MyLightRendering.Init();
            MyShadows.Init();
            MyLinesRenderer.Init();
            MySpritesRenderer.Init();
            MyPrimitivesRenderer.Init();
            MyFoliageRenderer.Init();
            MyOutline.Init();

            MyComponents.Init();

            MyBillboardRenderer.Init(); // hardcoded limits
            MyDebugRenderer.Init();
            MyGPUFoliageGenerating.Init();

            MyScreenDecals.Init();
            MyEnvProbeProcessing.Init();
            MyShadowsResolve.Init();
            MyAtmosphereRenderer.Init();
            MyAAEdgeMarking.Init();
            MyScreenPass.Init();
            MyCopyToRT.Init();
            MyBlendTargets.Init();
            MyFXAA.Init();
            MyDepthResolve.Init();
            MyBloom.Init();
            MyLuminanceAverage.Init();
            MyToneMapping.Init();
            MySSAO.Init();
            MyHdrDebugTools.Init();

            MySceneMaterials.Init();
            MyMaterials1.Init();
            MyVoxelMaterials1.Init();
            MyMeshMaterials1.Init();

            //MyShaderFactory.RunCompilation(); // rebuild
        }
        internal static void TestModel(MyMesh mesh)
        {
            if (m_test == null)
            {
                m_test = new MyMergeInstancing();
                m_test.m_rootMaterial = MyAssetsLoader.GetModel("Models//Cubes//Large//StoneCube.mwm").LODs[0].m_meshInfo.m_submeshes[MyMesh.DEFAULT_MESH_TECHNIQUE][0].Material;
            }

            if (m_test.IsMergable(mesh))
            {
                Debug.WriteLine(String.Format("{0} mergable: {1}", mesh.Name, m_test.IsMergable(mesh)));
            }
        }
Esempio n. 5
0
        internal MyMaterialMergeGroup(MyMeshTableSRV meshTable, MyMeshMaterialId matId, int index)
        {
            m_mergeGroup = new MyMergeInstancing(meshTable);
            m_rootMaterialRK = MyMeshMaterials1.Table[matId.Index].RepresentationKey;
            m_index = index;

            m_actors = new HashSet<MyActor>();
        }
        internal MyMaterialMergeGroup(MyMeshTableSRV meshTable, MyMeshMaterialId matId, int index)
        {
            m_mergeGroup = new MyMergeInstancing(meshTable);
            m_rootMaterialRK = MyMeshMaterials1.Table[matId.Index].RepresentationKey;
            Index = index;

            m_actors = new Dictionary<uint, MyActor>();
            m_actorIndices = new Dictionary<MyActor, int>();
        }
        internal static void TestModel(MyMesh mesh)
        {
            if (m_test == null)
            {
                m_test = new MyMergeInstancing();
                m_test.m_rootMaterial = MyAssetsLoader.GetModel("Models//Cubes//Large//StoneCube.mwm").LODs[0].m_meshInfo.m_submeshes[MyMesh.DEFAULT_MESH_TECHNIQUE][0].Material;
            }

            if (m_test.IsMergable(mesh))
            {
                Debug.WriteLine(String.Format("{0} mergable: {1}", mesh.Name, m_test.IsMergable(mesh)));
            }
        }