Render.ResetModelLighting

From GMod Wiki

Jump to: navigation, search
Function
Syntax Render.ResetModelLighting( Float Red, Float Green, Float Blue )
Where is this used?
Description:
Resets the model's lighting with the the specified color light.
Returns: nil
Part of Library: render
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Render.ResetModelLighting]Render.ResetModelLighting [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis was taken from the DModelPanel code.
Used onNewerClient.png
Code
 
    render.SuppressEngineLighting( true )
    render.SetLightingOrigin( self.Entity:GetPos() )
    render.ResetModelLighting( self.colAmbientLight.r/255, self.colAmbientLight.g/255, self.colAmbientLight.b/255 )
    render.SetColorModulation( self.colColor.r/255, self.colColor.g/255, self.colColor.b/255 )
    render.SetBlend( self.colColor.a/255 )
 
OutputWill set the lighting of the model.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox