Putting this here for reference, I had this written down as a function to convert from linear light into srgb.
// encode from linear light to sRGB luma
float sRGB_encode_f(float F)
if(F <= 0.00304)
lin = F*12.92;
lin = (1.055 * pow(F, (1.0/2.4)) - 0.055);
This node outputs a normalised colour given an input temperature in degrees Kelvin. This can be used as an input for lights to give the effect of different colour temperatures.
Temperature: Temperature in degrees Kelvin.
This shading node acts as a constant surface shader. It can be used to output flat colour without any shading (diffuse, specular, etc) on an object.
EmissionOn: When set to 0 it will only compute the InColour for Camera rays. This prevents it from bleeding light onto surrounding surfaces. When set to 1 it will behave as OSL intended it as act as an emissive light, which bleeds light onto surrounding surfaces.
InColour: The input colour. Can be constant or texture.
Note that when
EmissionOn is set to 1 it will take a lot longer to compute than when EmissionOn is set to 0.
This shading node does a binary switch between two input colours. Potentially useful if you want to test out two different textures or colour settings and don’t wish to rewire your shading network.
Which: Which colour input to use. 0 = InColour0 and 1 = InColour1.
InColour0: Input Colour 0
InColour1: Input Colour 1
This shading node applies an exposure adjustment to the input colour. This allows you to manipulate the colour using photographic stops.
Active: Disable the effect by setting this to 0. This allows you to disable the adjustment without having to rewire your shading network.
InColour: The input colour. This can be any type of colour (texture, constant, etc)
Exposure: Measured in stops. Each stop will increase (double) or decrease (halve) the brightness.