mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
rt mat counter-rotation of vm rotation
This commit is contained in:
parent
821665f94a
commit
374ce31c42
@ -201,9 +201,11 @@ function SWEP:DoRTScope(model, atttbl, active)
|
||||
local ang = EyeAngles()
|
||||
|
||||
if active then
|
||||
local sightzang = 0
|
||||
if self:ShouldDoScope() then
|
||||
self.RenderingRTScope = true
|
||||
local sight = self:GetSight()
|
||||
sightzang = sight.Ang.z
|
||||
local sightpos = sight.ShadowPos or (sight.OriginalSightTable or {}).Pos or sight.Pos or Vector(0, 0, 0)
|
||||
sightpos = sightpos * ((sight.slottbl or {}).Scale or 1)
|
||||
|
||||
@ -342,6 +344,8 @@ function SWEP:DoRTScope(model, atttbl, active)
|
||||
if sd > 0.5 then render.SetToneMappingScaleLinear(vec1) end
|
||||
|
||||
rtsurf:SetTexture("$basetexture", rtmat)
|
||||
rtsurf:SetFloat("$rot", self.ViewModelAng.z - sightzang)
|
||||
-- rtsurf:SetMatrix("$basetexturetransform", Matrix({{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}))
|
||||
|
||||
-- model:SetSubMaterial()
|
||||
|
||||
|
@ -1,4 +1,15 @@
|
||||
"UnlitGeneric"
|
||||
{
|
||||
"$baseTexture" "vgui/black"
|
||||
}
|
||||
|
||||
"$rot" "0"
|
||||
|
||||
"Proxies"
|
||||
{
|
||||
"texturetransform"
|
||||
{
|
||||
"rotatevar" "$rot"
|
||||
"resultvar" "$basetexturetransform"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user