Garry's Mod Wiki

Revision Difference

render.SetToneMappingScaleLinear#564672

<function name="SetToneMappingScaleLinear" parent="render" type="libraryfunc"> <realm>Client</realm> <description>Sets the tone mapping scale for upcoming rendering operations.</description>⤶ <args> <arg name="vec" type="Vector"></arg>⤶ <arg name="scales" type="Vector">The tonemapping scales.⤶ * X - Output scale⤶ * Y - Lightmap scale⤶ * Z - Reflection map scale</arg>⤶ </args> </function> <example> <description>This disables HDR bloom effect for the rendering inside the block.</description> <code> local tune_nohdr = Vector( 0.80, 0, 0 ) local oldtune = render.GetToneMappingScaleLinear( ) render.SetToneMappingScaleLinear(tune_nohdr) -- Turns off hdr local oldtune = render.GetToneMappingScaleLinear() render.SetToneMappingScaleLinear( tune_nohdr ) -- Turns off hdr -- render your stuff render.SetToneMappingScaleLinear(oldtune) -- Resets hdr render.SetToneMappingScaleLinear( oldtune ) -- Resets hdr </code> </example>