Hi peeps - "puki" here.
I've been messing about with double-sided surfaces. Lighting the thing as a single surface (regardless of which one) is okay. When I display both surfaces together, they won't light.
What am I missing?
Please help. I did try faffing about with it.
Thanks in advance.
I've been messing about with double-sided surfaces. Lighting the thing as a single surface (regardless of which one) is okay. When I display both surfaces together, they won't light.
What am I missing?
Graphics3D 640,480,16,2 SetBuffer BackBuffer() cam = CreateCamera() MoveEntity cam, 0,0,-12 light=CreateLight(2) LightColor light,0,0,255 MoveEntity light,1000,1000,-1000 light2=CreateLight(2) LightColor light2,255,0,0 MoveEntity light2,-1000,1000,-1000 mesh = CreateMesh() surface=CreateSurface(mesh) triangle1 = CreateSurface(mesh) v1 = AddVertex (triangle1,-2,-2,-2) v2 = AddVertex (triangle1, 0, 2, -2) v3 = AddVertex (triangle1, 2,-2,-2) tri = AddTriangle (triangle1,v1,v2,v3) tri = AddTriangle (triangle1,v3,v2,v1) UpdateNormals mesh While Not KeyHit(1) TurnEntity mesh,0,1,0 RenderWorld Flip Wend End
Please help. I did try faffing about with it.
Thanks in advance.