mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
arc9_fx_rtblur arc9_fx_adsblur ATT.RTBlurAdsAnyway
This commit is contained in:
parent
a83ffb9cb9
commit
9c7d85708f
@ -118,6 +118,7 @@ ATT.RTScopeReticle = Material("")
|
|||||||
ATT.RTScopeReticleScale = 1
|
ATT.RTScopeReticleScale = 1
|
||||||
ATT.RTScopeShadowIntensity = 1.5
|
ATT.RTScopeShadowIntensity = 1.5
|
||||||
ATT.RTCollimator = false -- Disables cheap scopes fov boost, disables sensivity adjustements
|
ATT.RTCollimator = false -- Disables cheap scopes fov boost, disables sensivity adjustements
|
||||||
|
ATT.RTBlurAdsAnyway = false -- If arc9_fx_adsblur 1 then blur gun anyway (as on non-rt sights). Disabled by default because it can blur and distort rt image
|
||||||
ATT.RTScopeNoPP = false
|
ATT.RTScopeNoPP = false
|
||||||
ATT.RTScopeNoShadow = false
|
ATT.RTScopeNoShadow = false
|
||||||
ATT.RTScopeBlackBox = false
|
ATT.RTScopeBlackBox = false
|
||||||
|
@ -453,6 +453,16 @@ local conVars = {
|
|||||||
default = "0",
|
default = "0",
|
||||||
client = true
|
client = true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "fx_rtblur",
|
||||||
|
default = "1",
|
||||||
|
client = true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "fx_adsblur",
|
||||||
|
default = "1",
|
||||||
|
client = true
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local prefix = "arc9_"
|
local prefix = "arc9_"
|
||||||
|
@ -48,8 +48,10 @@ function ENT:PhysicsCollide(colData, collider)
|
|||||||
if tbl then
|
if tbl then
|
||||||
snd = table.Random(tbl)
|
snd = table.Random(tbl)
|
||||||
end
|
end
|
||||||
|
|
||||||
self:EmitSound(snd)
|
if snd then
|
||||||
|
self:EmitSound(snd)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ENT:Think()
|
function ENT:Think()
|
||||||
|
@ -1,16 +1,43 @@
|
|||||||
local vignette = Material("arc9/bgvignette.png", "mips smooth")
|
local vignette = Material("arc9/bgvignette.png", "mips smooth")
|
||||||
-- local vignette2 = Material("arc9/bgvignette2.png", "mips smooth")
|
-- local vignette2 = Material("arc9/bgvignette2.png", "mips smooth")
|
||||||
|
|
||||||
|
|
||||||
|
local adsblur = Material("pp/arc9/adsblur")
|
||||||
|
local function arc9toytown(amount) -- cool ass blur
|
||||||
|
if amount > 0 then
|
||||||
|
local scrw, scrh = ScrW(), ScrH()
|
||||||
|
cam.Start2D()
|
||||||
|
surface.SetMaterial(adsblur)
|
||||||
|
surface.SetDrawColor(255, 255, 255, 255)
|
||||||
|
|
||||||
|
for i = 1, 5 * amount do -- 5 looking pretty cool
|
||||||
|
render.CopyRenderTargetToTexture(render.GetScreenEffectTexture())
|
||||||
|
surface.DrawTexturedRect(scrw*.5-scrh*.5, scrh*.58, scrh, scrh*0.42)
|
||||||
|
end
|
||||||
|
cam.End2D()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function SWEP:PreDrawViewModel()
|
function SWEP:PreDrawViewModel()
|
||||||
if ARC9.PresetCam then
|
if ARC9.PresetCam then
|
||||||
self:DoBodygroups(false)
|
self:DoBodygroups(false)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local getsights = self:GetSight()
|
||||||
|
local sightamount = self:GetSightAmount()
|
||||||
|
|
||||||
|
-- global for accessing later
|
||||||
|
ARC9.ShouldRTBlur = sightamount > 0 and GetConVar("arc9_fx_rtblur"):GetBool() and getsights.atttbl and getsights.atttbl.RTScopeFOV and getsights.atttbl.RTScopeFOV > 4.5 and !getsights.Disassociate and !getsights.atttbl.RTCollimator
|
||||||
|
if ARC9.ShouldRTBlur then DrawBokehDOF(2 * sightamount, 1, 0) end
|
||||||
|
ARC9.ShouldRTBlur = ARC9.ShouldRTBlur and !(getsights.atttbl and getsights.atttbl.RTBlurAdsAnyway) or false
|
||||||
|
|
||||||
local custdelta = self.CustomizeDelta
|
local custdelta = self.CustomizeDelta
|
||||||
|
|
||||||
if custdelta > 0 then
|
if custdelta > 0 then
|
||||||
if GetConVar("arc9_cust_blur"):GetBool() then DrawBokehDOF( 10 * custdelta, 1, 0.1 ) end
|
if GetConVar("arc9_cust_blur"):GetBool() then DrawBokehDOF(5 * custdelta, 1, 0.1) end
|
||||||
|
|
||||||
cam.Start2D()
|
cam.Start2D()
|
||||||
surface.SetDrawColor(0, 0, 0, 180 * custdelta)
|
surface.SetDrawColor(0, 0, 0, 180 * custdelta)
|
||||||
@ -22,7 +49,7 @@ function SWEP:PreDrawViewModel()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if GetConVar("arc9_cust_light"):GetBool() and self:GetCustomize() then
|
if GetConVar("arc9_cust_light"):GetBool() and self:GetCustomize() then
|
||||||
-- render.SuppressEngineLighting( true )
|
-- render.SuppressEngineLighting(true)
|
||||||
-- render.ResetModelLighting(0.6, 0.6, 0.6)
|
-- render.ResetModelLighting(0.6, 0.6, 0.6)
|
||||||
-- render.SetModelLighting(BOX_TOP, 4, 4, 4)
|
-- render.SetModelLighting(BOX_TOP, 4, 4, 4)
|
||||||
local light = DynamicLight(self:EntIndex(), true)
|
local light = DynamicLight(self:EntIndex(), true)
|
||||||
@ -35,7 +62,7 @@ function SWEP:PreDrawViewModel()
|
|||||||
light.Size = 500
|
light.Size = 500
|
||||||
light.DieTime = CurTime() + 0.1
|
light.DieTime = CurTime() + 0.1
|
||||||
-- else
|
-- else
|
||||||
-- render.SuppressEngineLighting( false )
|
-- render.SuppressEngineLighting(false)
|
||||||
-- render.ResetModelLighting(1,1,1)
|
-- render.ResetModelLighting(1,1,1)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -43,38 +70,41 @@ function SWEP:PreDrawViewModel()
|
|||||||
self:DoBodygroups(false)
|
self:DoBodygroups(false)
|
||||||
|
|
||||||
local bipodamount = self:GetBipodAmount()
|
local bipodamount = self:GetBipodAmount()
|
||||||
|
local vm = self:GetVM()
|
||||||
|
|
||||||
self:GetVM():SetPoseParameter("sights", math.max(self:GetSightAmount(), bipodamount))
|
vm:SetPoseParameter("sights", math.max(sightamount, bipodamount))
|
||||||
if self:GetValue("BoneMods") then for i, k in pairs(self:GetValue("BoneMods")) do
|
if self:GetValue("BoneMods") then for i, k in pairs(self:GetValue("BoneMods")) do
|
||||||
local boneindex = self:GetVM():LookupBone(i)
|
local boneindex = vm:LookupBone(i)
|
||||||
|
|
||||||
if !boneindex then continue end
|
if !boneindex then continue end
|
||||||
|
|
||||||
self:GetVM():ManipulateBonePosition(boneindex, k.pos or vector_origin)
|
vm:ManipulateBonePosition(boneindex, k.pos or vector_origin)
|
||||||
self:GetVM():ManipulateBoneAngles(boneindex, k.ang or angle_zero)
|
vm:ManipulateBoneAngles(boneindex, k.ang or angle_zero)
|
||||||
self:GetVM():ManipulateBoneScale(boneindex, k.scale or vector_origin)
|
vm:ManipulateBoneScale(boneindex, k.scale or vector_origin)
|
||||||
end end
|
end end
|
||||||
self:GetVM():InvalidateBoneCache()
|
vm:InvalidateBoneCache()
|
||||||
|
|
||||||
self.ViewModelFOV = self:GetViewModelFOV()
|
local vmfov = self:GetViewModelFOV()
|
||||||
|
|
||||||
|
self.ViewModelFOV = vmfov
|
||||||
|
|
||||||
if !GetConVar("arc9_dev_benchgun"):GetBool() then
|
if !GetConVar("arc9_dev_benchgun"):GetBool() then
|
||||||
cam.Start3D(nil, nil, self:WidescreenFix(self:GetViewModelFOV()), nil, nil, nil, nil, 0.5, 10000)
|
cam.Start3D(nil, nil, self:WidescreenFix(vmfov), nil, nil, nil, nil, 0.5, 10000)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- self:DrawCustomModel(true, EyePos() + EyeAngles():Forward() * 16, EyeAngles())
|
-- self:DrawCustomModel(true, EyePos() + EyeAngles():Forward() * 16, EyeAngles())
|
||||||
|
|
||||||
self:GetVM():SetSubMaterial()
|
vm:SetSubMaterial()
|
||||||
|
|
||||||
if self:GetHolsterTime() < CurTime() and self.RTScope and self:GetSightAmount() > 0 then
|
if self:GetHolsterTime() < CurTime() and self.RTScope and sightamount > 0 then
|
||||||
self:DoRTScope(self:GetVM(), self:GetTable(), self:GetSightAmount() > 0)
|
self:DoRTScope(vm, self:GetTable(), ssightamount > 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
self:GetVM():SetMaterial(self:GetProcessedValue("Material"))
|
vm:SetMaterial(self:GetProcessedValue("Material"))
|
||||||
|
|
||||||
cam.IgnoreZ(true)
|
cam.IgnoreZ(true)
|
||||||
|
|
||||||
if self:GetSightAmount() > 0.75 and self:GetSight().FlatScope and !self:GetSight().FlatScopeKeepVM then
|
if sightamount > 0.75 and getsights.FlatScope and !getsights.FlatScopeKeepVM then
|
||||||
render.SetBlend(0)
|
render.SetBlend(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -120,7 +150,7 @@ function SWEP:PostDrawViewModel()
|
|||||||
cam.End3D()
|
cam.End3D()
|
||||||
end
|
end
|
||||||
|
|
||||||
cam.Start3D(nil, nil, self:WidescreenFix(self:GetViewModelFOV()), nil, nil, nil, nil, 1, 10000 )
|
cam.Start3D(nil, nil, self:WidescreenFix(self:GetViewModelFOV()), nil, nil, nil, nil, 1, 10000)
|
||||||
for _, model in ipairs(self.VModel) do
|
for _, model in ipairs(self.VModel) do
|
||||||
local slottbl = model.slottbl
|
local slottbl = model.slottbl
|
||||||
local atttbl = self:GetFinalAttTable(slottbl)
|
local atttbl = self:GetFinalAttTable(slottbl)
|
||||||
@ -133,5 +163,7 @@ function SWEP:PostDrawViewModel()
|
|||||||
end
|
end
|
||||||
cam.End3D()
|
cam.End3D()
|
||||||
|
|
||||||
|
|
||||||
|
if !ARC9.ShouldRTBlur and GetConVar("arc9_fx_adsblur"):GetBool() then arc9toytown(self:GetSightAmount()) end -- cool ass blur
|
||||||
-- render.UpdateFullScreenDepthTexture()
|
-- render.UpdateFullScreenDepthTexture()
|
||||||
end
|
end
|
@ -858,7 +858,7 @@ SWEP.HoldTypeBlindfire = "pistol"
|
|||||||
SWEP.HoldTypeNPC = nil
|
SWEP.HoldTypeNPC = nil
|
||||||
|
|
||||||
SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2
|
SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2
|
||||||
SWEP.AnimReload = ACT_HL2MP_GESTURE_RELOAD_AR2 -- While in TPIK only
|
SWEP.AnimReload = ACT_HL2MP_GESTURE_RELOAD_AR2 -- While in TPIK only -- Tip: if you dont want any additional anim put ACT_HL2MP_GESTURE_RELOAD_MAGIC here instead!
|
||||||
SWEP.NonTPIKAnimReload = ACT_HL2MP_GESTURE_RELOAD_AR2 -- Non TPIK
|
SWEP.NonTPIKAnimReload = ACT_HL2MP_GESTURE_RELOAD_AR2 -- Non TPIK
|
||||||
SWEP.AnimDraw = false
|
SWEP.AnimDraw = false
|
||||||
SWEP.AnimMelee = ACT_GMOD_GESTURE_MELEE_SHOVE_2HAND
|
SWEP.AnimMelee = ACT_GMOD_GESTURE_MELEE_SHOVE_2HAND
|
||||||
@ -954,7 +954,7 @@ SWEP.Attachments = {
|
|||||||
-- Ang = Angle(0, 0, 0),
|
-- Ang = Angle(0, 0, 0),
|
||||||
-- CorrectiveAng = Angle(0, 0, 0), -- sometimes, the autosolver needs a little help. Try (-1, -1, 0)
|
-- CorrectiveAng = Angle(0, 0, 0), -- sometimes, the autosolver needs a little help. Try (-1, -1, 0)
|
||||||
-- Scale = 1,
|
-- Scale = 1,
|
||||||
-- DuplicateModels = { -- For guns that require duplicating attachment models, e.g. akimbo
|
-- DuplicateModels = { -- For guns that require duplicating attachment models, e.g. akimbo or guns with 2 mags on model
|
||||||
-- {
|
-- {
|
||||||
-- Bone = "",
|
-- Bone = "",
|
||||||
-- Pos = Vector(0, 0, 0),
|
-- Pos = Vector(0, 0, 0),
|
||||||
|
21
materials/pp/arc9/adsblur.vmt
Normal file
21
materials/pp/arc9/adsblur.vmt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
"Refract"
|
||||||
|
{
|
||||||
|
"$basetexture" "_rt_FullFrameFB"
|
||||||
|
"$normalmap" "pp/arc9/adsblur"
|
||||||
|
"$fbtexture" "_rt_FullFrameFB"
|
||||||
|
"$refractamount" "0"
|
||||||
|
"$vertexalpha" "0"
|
||||||
|
"$vertexcolor" "0"
|
||||||
|
"$translucent" "0"
|
||||||
|
"$forcerefract" "1"
|
||||||
|
"$bluramount" "1"
|
||||||
|
"$nofog" "0"
|
||||||
|
"$ignorez" "1"
|
||||||
|
"$nocull" "1"
|
||||||
|
// "$model" "1"
|
||||||
|
|
||||||
|
"Refract_DX60"
|
||||||
|
{
|
||||||
|
"$fallbackmaterial" "null"
|
||||||
|
}
|
||||||
|
}
|
BIN
materials/pp/arc9/adsblur.vtf
Normal file
BIN
materials/pp/arc9/adsblur.vtf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user