<map name="SDF demo">

    <TMSImage name="ReadyMap 15m Imagery">
        <url>https://readymap.org/readymap/tiles/1.0.0/7/</url>
    </TMSImage>
    
    <xi:include href="osm_data.xml" name="data:osm"/>
    
    <FeatureSDF name="SDF roads 1" min_level="14" tile_size="1024" caching="false">
        <features>data:osm</features>
        <inverted>true</inverted>
        <styles>
            <style><![CDATA[
                first {
                    select: feature.properties.highway === 'tertiary';
                    render-sdf-min-distance: 0;
                    render-sdf-max-distance: 25;
                }
                second {
                    select: feature.properties.building === 'yes';
                    render-sdf-min-distance: 0;
                    render-sdf-max-distance: 5;
                }
            ]]></style>
        </styles>
        <shader><![CDATA[
            #pragma vp_function invert_alpha, fragment
            void invert_alpha(inout vec4 color) {
                color = vec4(1, 0, 0, 1-color.r);
            }
         ]]></shader>
    </FeatureSDF>
    
    <Viewpoints home="0" time="0">
        <viewpoint name="New Orleans">
            <pitch>-89</pitch>
            <range>837.938m</range>
            <long>-90.0725</long>
            <lat>29.9245</lat>
        </viewpoint>
    </Viewpoints>
</map>