I am new to this awesome community, I am currently writing a ray tracer but I hit a problem...
Let's say I have a surface(material doesn't matter) of colour [1, 0, 0] in RGB, and the radiance reaching a point on the surface is say 2000 units.
So my question is, after all the simulation, just before writing an output file(for example png), what operation or algorithm do I use to modify the colour using the radiance value, to give an perception of brightness. If the radiance is to high, the output should give a somewhat white-ish colour, and if the radiance is less, it has to give a dark-ish colour.
Is there anyway I can do this easily and efficiently, or is it a complex process?
This is a rendered image from Blender...
As you can see in the image, the place closer to the light is white-ish(due to higher radiance reaching it) and rest is red or darker red, so what do I do to get a result like that?
I have no idea how to actually perform something like to get the expected RGB value...
Note: I want to generate a PNG image and not a .HDR or .EXR image
I hope the question is clear, and hopefully isn't a duplicate because I couldn't find my answer anywhere else...
Any help would be highly appreciated, thanks :)