• World models visible through 3D2D texture
    0 replies, posted
I've been working on a script that essentially places images of my choosing on a combine monitor. After spending some time getting the coordinates and tweeking the coordinates yesterday, I finally put up a picture with surface.DrawTexturedRect inside of a cam.3D2D. When I got the picture rendered, I noticed world models were visible through the material. I converted the picture from a .png to a .vtf and .vmt using VTFEdit with the default settings. It doesn't return any errors at all, any idea whats wrong? [B]My code:[/B] [CODE]-- Called when the entity should draw. local SignMaterial = Material("banners/banner1.png") function ENT:Draw() self:DrawModel() local position = self:GetPos() local angles = self:GetAngles() angles:RotateAroundAxis(angles:Up(), 90) angles:RotateAroundAxis(angles:Forward(), 90) local f, r, u = self:GetForward(), self:GetRight(), self:GetUp() cam.Start3D2D(position + f*53.80 + r*-(-45.5) + u*95.75, angles, 1) surface.SetDrawColor( 255, 255, 255, 255 ) surface.SetMaterial( SignMaterial ) surface.DrawTexturedRect( 0, 0, 90, 190 ) cam.End3D2D() end;[/CODE] [B]My VMT:[/B] [CODE]"UnlitGeneric" { "$basetexture" "banners/banner1" "$nolod" 1 "$vertexalpha" 1 "$vertexcolor" 1 }[/CODE] [B]Picture:[/B] [IMG]http://images.akamai.steamusercontent.com/ugc/313368332395864253/CDC41582CD5CE917BFB6C6F7D5C23900AB34EF97/[/IMG]
Sorry, you need to Log In to post a reply to this thread.