this ignores the sampler passed and could be done in a nicer way so left this as an ifdef so it can be easily redone.