public override GUID AddShader(CustomShaderMeta shaderMeta,
                                       CustomShaderDatabaseFile database,
                                       IShaderDatabaseFileIO fileIOHandler)
        {
            string guid = base.AddShader(shaderMeta, database, fileIOHandler);

            database.lights.Add(guid, shaderMeta);
            fileIOHandler.WriteDatabaseToFile(database);

            return(guid);
        }
Пример #2
0
        public override GUID RemoveShader(CustomShaderMeta shaderMeta,
                                          CustomShaderDatabaseFile database,
                                          IShaderDatabaseFileIO fileIOHandler)
        {
            string guid = base.RemoveShader(shaderMeta, database, fileIOHandler);

            database.intersect.Remove(guid);
            fileIOHandler.WriteDatabaseToFile(database);

            return(guid);
        }
Пример #3
0
        public override GUID MoveShader(CustomShaderMeta shaderMeta,
                                        CustomShaderMeta previousShaderMeta,
                                        CustomShaderDatabaseFile database,
                                        IShaderDatabaseFileIO fileIOHandler)
        {
            string guid = base.MoveShader(shaderMeta, previousShaderMeta, database, fileIOHandler);

            database.closetHit.Remove(guid);
            database.closetHit.Add(guid, shaderMeta);
            fileIOHandler.WriteDatabaseToFile(database);

            return(guid);
        }
        public virtual GUID RemoveShader(CustomShaderMeta shaderMeta, CustomShaderDatabaseFile database, IShaderDatabaseFileIO fileIOHandler)
        {
            isDirty = true;

            var guid = shaderList[shaderMeta.name];

            shaderList.Remove(shaderMeta.name);
            shaderMetaList.Remove(shaderMeta.name);

            return(guid);
        }
        public virtual GUID MoveShader(CustomShaderMeta shaderMeta, CustomShaderMeta previousShaderMeta, CustomShaderDatabaseFile database, IShaderDatabaseFileIO fileIOHandler)
        {
            isDirty = true;

            var guid = shaderList[previousShaderMeta.name];

            shaderList.Remove(previousShaderMeta.name);
            shaderMetaList.Remove(previousShaderMeta.name);
            shaderList.Add(shaderMeta.name, guid);
            shaderMetaList.Add(shaderMeta.name, shaderMeta);

            return(guid);
        }
 public virtual GUID AddShader(CustomShaderMeta shaderMeta, CustomShaderDatabaseFile database, IShaderDatabaseFileIO fileIOHandler)
 {
     isDirty = true;
     return(AddShaderHelper(shaderMeta));
 }