Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2016
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 'Calculate UV
  2.                 s = DotProduct(vert.X, vert.Y, vert.Z, texInfo.VectorS.X, texInfo.VectorS.Y, texInfo.VectorS.Z) + texInfo.DistS
  3.                 t = DotProduct(vert.X, vert.Y, vert.Z, texInfo.VectorT.X, texInfo.VectorT.Y, texInfo.VectorT.Z) + texInfo.DistT
  4.                
  5.                 'lightmap
  6.                 If face.LightMap >= 0 Then
  7.                     VertexTexCoords(surf, vertCount, (s - face.LightMinUV.x) / (face.LightDist.x + 1), (t - face.LightMinUV.y) / (face.LightDist.y + 1), 0, 1)
  8.                     'VertexTexCoords(surf, vertCount, (face.LightMapPos.x / Float(myBSP.LightMapTexture.width)) + ((s - face.LightMinUV.x) / (face.LightDist.x + 1)), (face.LightMapPos.y / Float(myBSP.LightMapTexture.Height)) + (t - face.LightMinUV.y) / (face.LightDist.y + 1), 0, 1)
  9.                 Else
  10.                     If Not mipTex.Name.StartsWith("*") Then VertexColor(surf, vertCount, 1, 1, 1)
  11.                 EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement