If I understand correctly, sensors can produce a moire effect because their subpixels are separate (each one is affected by a different portion of the image), so to stop this effect, some cameras have a blur filter in front of the sensor, but this reduces the image quality by a lot.
My question is, why don't camera makers add a blur filter for each individual pixel, so that all subpixels receive the same amount of light, but none of the blurred light reaches another pixel (this could be done either by making the filter bubble around each pixel, or by adding a frame, preferably a reflective one, to separate the pixels before blurring)? Is it only because it would increase the cost for producing them?
Sorry if there's something I'm not understanding, I'm a programmer and don't have a lot of experience with cameras.