use sampler and raster state from gfxlib