mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
53 lines
1.3 KiB
Lua
53 lines
1.3 KiB
Lua
|
|
--[[
|
||
|
|
| This file was obtained through the combined efforts
|
||
|
|
| of Madbluntz & Plymouth Antiquarian Society.
|
||
|
|
|
|
||
|
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||
|
|
| Maloy, DrPepper10 @ RIP, Atle!
|
||
|
|
|
|
||
|
|
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||
|
|
--]]
|
||
|
|
|
||
|
|
|
||
|
|
matproxy.Add( {
|
||
|
|
name = "SkyPaint",
|
||
|
|
|
||
|
|
init = function( self, mat, values )
|
||
|
|
end,
|
||
|
|
|
||
|
|
bind = function( self, mat, ent )
|
||
|
|
|
||
|
|
local skyPaint = g_SkyPaint
|
||
|
|
if ( !IsValid( skyPaint ) ) then return end
|
||
|
|
|
||
|
|
local values = skyPaint:GetNetworkVars()
|
||
|
|
|
||
|
|
mat:SetVector( "$TOPCOLOR", values.TopColor )
|
||
|
|
mat:SetVector( "$BOTTOMCOLOR", values.BottomColor )
|
||
|
|
mat:SetVector( "$DUSKCOLOR", values.DuskColor )
|
||
|
|
mat:SetFloat( "$DUSKSCALE", values.DuskScale )
|
||
|
|
mat:SetFloat( "$DUSKINTENSITY", values.DuskIntensity )
|
||
|
|
mat:SetFloat( "$FADEBIAS", values.FadeBias )
|
||
|
|
mat:SetFloat( "$HDRSCALE", values.HDRScale )
|
||
|
|
|
||
|
|
mat:SetVector( "$SUNNORMAL", values.SunNormal )
|
||
|
|
mat:SetVector( "$SUNCOLOR", values.SunColor )
|
||
|
|
mat:SetFloat( "$SUNSIZE", values.SunSize )
|
||
|
|
|
||
|
|
if ( values.DrawStars ) then
|
||
|
|
|
||
|
|
mat:SetInt( "$STARLAYERS", values.StarLayers )
|
||
|
|
mat:SetFloat( "$STARSCALE", values.StarScale )
|
||
|
|
mat:SetFloat( "$STARFADE", values.StarFade )
|
||
|
|
mat:SetFloat( "$STARPOS", values.StarSpeed * RealTime() )
|
||
|
|
mat:SetTexture( "$STARTEXTURE", values.StarTexture )
|
||
|
|
|
||
|
|
else
|
||
|
|
|
||
|
|
mat:SetInt( "$STARLAYERS", 0 )
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|
||
|
|
} )
|