I was personally unable to reproduce the issue in my testing, and I can’t think of a reason off the top of my head why the OSL camera would render bump mapping darker.
Although looking at the file you’ve provided, it seems like maybe the OSL camera is just overall darker and the issue isn’t limited to bump mapping?
If the issue is limited to materials with bump mapping, then I recommend you create a bug report. The easiest way is to:
- Open Blender
- Select “Help → Report a bug” from the top of Blender
- Fill out the form with all the relevant information, includling:
- The .blend file with the OSL script
- And whether or not this issue occurs with the CPU, OptiX, or both