Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Calculate UV
- s = DotProduct(vert.X, vert.Y, vert.Z, texInfo.VectorS.X, texInfo.VectorS.Y, texInfo.VectorS.Z) + texInfo.DistS
- t = DotProduct(vert.X, vert.Y, vert.Z, texInfo.VectorT.X, texInfo.VectorT.Y, texInfo.VectorT.Z) + texInfo.DistT
- 'lightmap
- If face.LightMap >= 0 Then
- VertexTexCoords(surf, vertCount, (s - face.LightMinUV.x) / (face.LightDist.x + 1), (t - face.LightMinUV.y) / (face.LightDist.y + 1), 0, 1)
- '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)
- Else
- If Not mipTex.Name.StartsWith("*") Then VertexColor(surf, vertCount, 1, 1, 1)
- EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement