CapsAdmin

Untitled

Jan 26th, 2012
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1.  
  2. local size = 64
  3. local count = size*size
  4. local pos = Vector(4907, -4788, -7257)
  5.  
  6. local wire = Material("models/wireframe")
  7.  
  8. hook.Add("RenderScreenspaceEffects", "asdasd", function()
  9.     cam.Start3D(EyePos(), EyeAngles())
  10.    
  11.         render.SetMaterial(wire)
  12.        
  13.         local mat = Matrix()
  14.         mat:Translate(pos)
  15.        
  16.         cam.PushModelMatrix(mat)
  17.             mesh.Begin(MATERIAL_TRIANGLE_STRIP, count)
  18.                 for x = 0, size do
  19.                 for y = 0, size do
  20.                     mesh.Position(Vector(x, y, 0))
  21.                     mesh.Normal(Vector(0, 0, 1))
  22.                     mesh.TexCoord(0, x/size, y/size)
  23.                     mesh.AdvanceVertex()
  24.                 end
  25.                 end
  26.             mesh.End()
  27.         cam.PopModelMatrix()
  28.        
  29.     cam.End3D()
  30. end)
Advertisement
Add Comment
Please, Sign In to add comment