示例#1
0
        public MatTextureWrapper(string key, string text, MatTexture texture)
        {
            Name       = key;
            Text       = text;
            textureMap = texture;

            ImageKey         = "TextureMaterialMap";
            SelectedImageKey = "TextureMaterialMap";
        }
示例#2
0
        public ResUGX2.TexSampler Save(MatTexture matTex)
        {
            var texSampler = new ResUGX2.TexSampler();

            texSampler.BorderType          = BorderType;
            texSampler.ClampX              = ClampX;
            texSampler.ClampY              = ClampY;
            texSampler.ClampZ              = ClampZ;
            texSampler.DepthCompareEnabled = DepthCompareEnabled;
            texSampler.DepthCompareFunc    = DepthCompareFunc;
            texSampler.MinFilter           = MinFilter;
            texSampler.MipFilter           = MipFilter;
            texSampler.ZFilter             = ZFilter;

            texSampler.LodBias = matTex.BiasLod;
            texSampler.MaxLod  = matTex.MaxLod;
            texSampler.MinLod  = matTex.minFilter;

            return(texSampler);
        }