setExposure()
Purpose
Sets the exposure of the virtual camera
Description
Used to change the virtual camera's light sensitivity. Additional optional argument may be supplied for control over white level.
Syntax
setExposure( exposure )
setExposure( exposure, whiteLevel )
Arguments
exposure Float amount of exposure. Higher number yields more brightness
whiteLevel Float brightness level which corresponds to maximum brightness of the display output
Example
c = controls(0)
oldc = c
ink(navy)
obj = placeObject( cube, { 0, 0, 0 }, { 2, 2, 2 } )
setObjectMaterial( obj, white, 0, 1 )
worldLight( { 0, -1, 0 }, white, 1 )
setCamera( { 0, 1, 24 }, {} )
setEnvironment(3, { .2, .2, .2, 1 } )
exposure = 1
whiteLevel = 1
loop
clear()
c = controls(0)
exposure += c.ly * 0.01
whiteLevel += c.ry * 0.01
rotateObject( obj, { 0, 1, 1 }, 1 )
drawObjects()
oldc = c
printAt( 0, 0, "Push the left control stick up or down to adjust exposure" )
printAt( 0, 2, "Exposure: ", exposure )
printAt( 0, 4, "Push the right control stick up or down to adjust white level" )
printAt( 0, 6, "White level: ", whiteLevel )
update()
repeat
Associated Commands