https://en.wikipedia.org/wiki/Bayer_filter
Random 4k image sensor
http://www.sony-semicon.co.jp/products_en/IS/sensor2/img/products/IMX377CQT_ProductSummary_v1.5_20150414.pdf
It use a RGGB pattern and get up to 12bit per channel.
Depending on the hardware of such a chip there are different bit per channel information and real sensed information.
E.g. a cheap image sensor can grab 10bit red, 12bit green and 10bit red in a 32bit pixel in the memory buffer but it only sense 8bit, 10bit, 8bit and scale up into the intermediate format.
Also important the raw image is as it said raw, it's larger as the final image because it includes the pixel from the border of the sensor which are cut out in a post processing.
This you can see in the specs linked. This pixel on the border are partially black or don't provide all 3 color because they are covered by the case material and/or receive less photons. It looks a little bit like vignetting effect but the one you see in movies come from panels at the end of the objective.
https://en.wikipedia.org/wiki/Vignetting
The colors are also not in the way you expect them to be, they have to be mapped to a color space by using calibrated function for each channel.
For each sensor you have different one and the 3 sensor I were working with provided them with a firmware on the sensor pcb.
The result after a lot of post processing you receive a part of the image from the sensor in a specific color space like yuv with 8 bit per channel.
You get better results if the range per color channel is higher because you lose less on the conversion into an other color space.
In our rover we use RGGB and Gray Image sensor with 2k*2k resolution. The gigapixel panorama is done with the gray image sensor and a filter wheel.
The filter wheel consists of different filter like red, blue, green, infrared.
The camera I using on an other project is this and here the specs.
As you can see in the image it's a part of a raw image grab of a single frame without correction and filtering, just color space conversion to 8r8g8b.
You can see the noise in the dark area where photons hit the sensor during the time the sensor gather input.
There is also color shifting all over the place which can be fixed with additional frames or longer shutter times(not a good idea).
Physically base rendering is pretty complex topic and you have different solutions with different abstractions.
Currently we have BRDF in the game industrie and start to see the first steps further.
The current problem is, that we're using point meassurements of real materials and use them as a full material which is simply wrong.
Thats the biggest problem why even BSSRDF renderings look artifical you need material imperfection which means much more meassure points of the same material on different places and generate a lookup map from this. This is currently done by hand from texture artists till they think it looks right or no time is left for further polishment.
This is also the reason the most games I saw use splatmaps to combine multiple materials and then adjust the roughtness, metallic and other textures by hand afterwards.
The Order 1886 developer build a material scanner(last pages) and bought alot of samples and take pictures with different light setups to obtain more correct information about the materials already including variation and imperfection.
With this library and splatmaps they combine multiple materials.
Here you can find a awesome description and a live demo to micro facets or also called roughtness in some BRDF renderer.
This is only a abstraction because micro facet can be really irregular like snow or even reflect different colors in different angles like some metallic coats on car.
This can be achived by tiny metal flakes with different colors in the transparent paint which align randomly or get aligned by the power of science in a specific formation.
It's also possible to layer three colors and cut in a specific angle with the laser to see one color from one angle and the other from an other angle and else the top color of the stack.
The last technique is used in the industrie to build filter to allow a camera to see through a glas but the light from an other direction will reflected by a specific amount.