Garry's Mod Wiki

ProjectedTexture

A client side projected texture, created by ProjectedTexture.

Methods

Angle ProjectedTexture:GetAngles()
Returns the angle of the ProjectedTexture, which were previously set by ProjectedTexture:SetAngles
number ProjectedTexture:GetBrightness()
Returns the brightness of the ProjectedTexture, which was previously set by ProjectedTexture:SetBrightness
table ProjectedTexture:GetColor()
Returns the color of the ProjectedTexture, which was previously set by ProjectedTexture:SetColor. The returned color will not have the color metatable.
number ProjectedTexture:GetConstantAttenuation()
Returns the constant attenuation of the projected texture, which can also be set by ProjectedTexture:SetConstantAttenuation.
boolean ProjectedTexture:GetEnableShadows()
Returns whether shadows are enabled for this ProjectedTexture, which was previously set by ProjectedTexture:SetEnableShadows
number ProjectedTexture:GetFarZ()
Returns the projection distance of the ProjectedTexture, which was previously set by ProjectedTexture:SetFarZ
number ProjectedTexture:GetHorizontalFOV()
Returns the horizontal FOV of the ProjectedTexture, which was previously set by ProjectedTexture:SetHorizontalFOV or ProjectedTexture:SetFOV
number ProjectedTexture:GetLinearAttenuation()
Returns the linear attenuation of the projected texture, which can also be set by ProjectedTexture:SetLinearAttenuation.
number ProjectedTexture:GetNearZ()
Returns the NearZ value of the ProjectedTexture, which was previously set by ProjectedTexture:SetNearZ
boolean, number, number, number, number ProjectedTexture:GetOrthographic()
Returns the current orthographic settings of the Projected Texture. To set these values, use ProjectedTexture:SetOrthographic.
Vector ProjectedTexture:GetPos()
Returns the position of the ProjectedTexture, which was previously set by ProjectedTexture:SetPos
number ProjectedTexture:GetQuadraticAttenuation()
Returns the quadratic attenuation of the projected texture, which can also be set by ProjectedTexture:SetQuadraticAttenuation.
ITexture ProjectedTexture:GetTexture()
Returns the texture of the ProjectedTexture, which was previously set by ProjectedTexture:SetTexture
number ProjectedTexture:GetTextureFrame()
Returns the texture frame of the ProjectedTexture, which was previously set by ProjectedTexture:SetTextureFrame
number ProjectedTexture:GetVerticalFOV()
Returns the vertical FOV of the ProjectedTexture, which was previously set by ProjectedTexture:SetVerticalFOV or ProjectedTexture:SetFOV
boolean ProjectedTexture:IsValid()
Returns true if the projected texture is valid (i.e. has not been removed), false otherwise. Instead of calling this directly it's a good idea to call IsValid in case the variable is nil. IsValid( ptexture ) This not only checks whether the projected texture is valid - but also checks whether it's nil.
ProjectedTexture:Remove()
Removes the projected texture. After calling this, ProjectedTexture:IsValid will return false, and any hooks with the projected texture as the identifier will be automatically deleted.
ProjectedTexture:SetAngles( Angle angle )
Sets the angles (direction) of the projected texture. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetBrightness( number brightness )
Sets the brightness of the projected texture. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetColor( table color )
Sets the color of the projected texture. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetConstantAttenuation( number constAtten )
Sets the constant attenuation of the projected texture. See also ProjectedTexture:SetLinearAttenuation and ProjectedTexture:SetQuadraticAttenuation. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetEnableShadows( boolean newState )
Enable or disable shadows cast from the projected texture. as with all types of projected textures (including the player's flashlight and env_projectedtexture), there can only be 8 projected textures with shadows enabled in total. This limit can be increased with the launch parameter: -numshadowtextures limit where limit is the new limit. Naturally, many projected lights with shadows enabled will drastically decrease framerate. You must call ProjectedTexture:Update after using this function for it to take..
ProjectedTexture:SetFarZ( number farZ )
Sets the distance at which the projected texture ends. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetFOV( number fov )
Sets the angle of projection. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetHorizontalFOV( number hFOV )
Sets the horizontal angle of projection without affecting the vertical angle. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetLinearAttenuation( number linearAtten )
Sets the linear attenuation of the projected texture. See also ProjectedTexture:SetConstantAttenuation and ProjectedTexture:SetQuadraticAttenuation. The default value of linear attenuation when the projected texture is created is 100. (others are 0, as you are not supposed to mix them) You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetNearZ( number nearZ )
Sets the distance at which the projected texture begins its projection. You must call ProjectedTexture:Update after using this function for it to take effect. Setting this to 0 will disable the projected texture completely! This may be useful if you want to disable a projected texture without actually removing itThis seems to affect the rendering of shadows - a higher Near Z value will have shadows begin to render closer to their casting object. Comparing a low Near Z value (like 1) with a normal one (12)..
ProjectedTexture:SetOrthographic( boolean orthographic, number left, number top, number right, number bottom )
Changes the current projected texture between orthographic and perspective projection. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetPos( Vector position )
Move the Projected Texture to the specified position. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetQuadraticAttenuation( number quadAtten )
Sets the quadratic attenuation of the projected texture. See also ProjectedTexture:SetLinearAttenuation and ProjectedTexture:SetConstantAttenuation. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetTexture( string texture )
Sets the texture to be projected. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetTextureFrame( number frame )
For animated textures, this will choose which frame in the animation will be projected. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:SetVerticalFOV( number vFOV )
Sets the vertical angle of projection without affecting the horizontal angle. You must call ProjectedTexture:Update after using this function for it to take effect.
ProjectedTexture:Update()
Updates the Projected Light and applies all previously set parameters.

Page Links


Special Pages


Wikis

?

Render Time: 26ms

Session 0
DB GetPage 3
Generate Html 3
SaveChanges 10
Render Body 0
Render Sidebar 8