'\" -*- coding: us-ascii -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH osgearth_sharedlayer 1 "05 May 2016" "" "" .SH NAME osgearth_sharedlayer \- demonstration of shared layers .SH SYNOPSIS 'nh .fi .ad l \fBosgearth_sharedlayer\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \fB--shapefile\fR \fIfile.shp\fR 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBosgearth_sharedlayer\fR is a sample program which demonstrates the use of shared layers. A shared image layer is one that becomes available to other image layers during the rendering phase. Thus if you share a layer, you can access it in a customer shader and use it to modulate another layer. .PP In this example, we render a masking layer from a shapefile using the rasterization (agglite) driver. We don't draw this layer directly; instead we use it as a mask and use that mask to modulate the imagery layer from a custom shader, drawing random colors where the mask exists. .SH OPTIONS .TP \*(T<\fB\-\-shapefile\fR\*(T> \fIfile.shp\fR Path to the shapefile