コード例 #1
0
        public void LoadModel(Queue transferQ, string path)
        {
            dev.WaitIdle();
            model?.Dispose();

            if (TEXTURE_ARRAY)
            {
                PbrModelTexArray mod = new PbrModelTexArray(transferQ, path);
                if (mod.texArray != null)
                {
                    DescriptorSetWrites uboUpdate = new DescriptorSetWrites(dsMain, descLayoutMain.Bindings[5], descLayoutMain.Bindings[7]);
                    uboUpdate.Write(dev, mod.materialUBO.Descriptor, mod.texArray.Descriptor);
                }
                model = mod;
            }
            else
            {
                model = new PbrModelSeparatedTextures(transferQ, path,
                                                      descLayoutTextures,
                                                      AttachmentType.Color,
                                                      AttachmentType.PhysicalProps,
                                                      AttachmentType.Normal,
                                                      AttachmentType.AmbientOcclusion,
                                                      AttachmentType.Emissive);

                DescriptorSetWrites uboUpdate = new DescriptorSetWrites(dsMain, descLayoutMain.Bindings[5]);
                uboUpdate.Write(dev, model.materialUBO.Descriptor);
            }


            modelAABB = model.DefaultScene.AABB;
        }
コード例 #2
0
        public void LoadModel(Queue transferQ, string path)
        {
            dev.WaitIdle();

            model?.Dispose();
            model = new PbrModelTexArray(transferQ, path);

            DescriptorSetWrites uboUpdate = new DescriptorSetWrites(dsMain, descLayoutMain.Bindings[5], descLayoutMain.Bindings[7]);

            uboUpdate.Write(dev, model.materialUBO.Descriptor, (model as PbrModelTexArray).texArray.Descriptor);

            modelAABB = model.DefaultScene.AABB;
        }
コード例 #3
0
ファイル: PbrPipeline.cs プロジェクト: jpbruyere/vke.net
        public void LoadModel(Queue staggingQ, string path)
        {
            model?.Dispose();

            model = new PbrModel(staggingQ, path, descLayoutTextures,
                                 AttachmentType.Color,
                                 AttachmentType.PhysicalProps,
                                 AttachmentType.Normal,
                                 AttachmentType.AmbientOcclusion,
                                 AttachmentType.Emissive);

            DescriptorSetWrites uboUpdate = new DescriptorSetWrites(descLayoutMain.Bindings[4]);

            uboUpdate.Write(Dev, dsMain, model.materialUBO.Descriptor);
        }