Layer and OffScreenTexture modified for variable size