Exemplo n.º 1
0
        public static TextureLoadParameters FromYaml(YamlMappingNode yaml)
        {
            if (yaml.TryGetNode("sample", out YamlMappingNode sampleNode))
            {
                return(new TextureLoadParameters {
                    SampleParameters = TextureSampleParameters.FromYaml(sampleNode)
                });
            }

            return(Default);
        }
Exemplo n.º 2
0
        public static TextureLoadParameters FromYaml(YamlMappingNode yaml)
        {
            var loadParams = TextureLoadParameters.Default;

            if (yaml.TryGetNode("sample", out YamlMappingNode? sampleNode))
            {
                loadParams.SampleParameters = TextureSampleParameters.FromYaml(sampleNode);
            }

            if (yaml.TryGetNode("srgb", out var srgb))
            {
                loadParams.Srgb = srgb.AsBool();
            }

            return(loadParams);
        }