Lightmapping - texture bleeding ???

Blitz3D Forums/Blitz3D Programming/Lightmapping - texture bleeding ???

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Little success:



Got rid of the dark edges, but the slightly colored edges remain.
Does ANYBODY have an idea ?????

For vert=0 To 2
			If minu#>tri\pu[vert] Then minu#=tri\pu[vert]
			If maxu#<tri\pu[vert] Then maxu#=tri\pu[vert]
			If minv#>tri\pv[vert] Then minv#=tri\pv[vert]
			If maxv#<tri\pv[vert] Then maxv#=tri\pv[vert]
		Next
		For vert=0 To 2
			If minu#=tri\pu[vert] Then addu#=(1/lmsize)*.5
			If maxu#=tri\pu[vert] Then addu#=-(1/lmsize)*.5
			If minv#=tri\pv[vert] Then addv#=(1/lmsize)*.5
			If maxv#=tri\pv[vert] Then addv#=-(1/lmsize)*.5
			u#=((tri\pu[vert] * (size /lmsize) )+(x/lmsize))+addu#
			v#=((tri\pv[vert] * (size / lmsize) )+(y/lmsize))+addv#
			DebugLog "VERTEX "+tri\vert[vert]+" Texturcoord: "+u*mapw+" "+v*maph+" - "+tri\pu[vert]+" "+tri\pv[vert]
			 VertexTexCoords(tri\surface,tri\vert[vert],u,v,1,cset)
		Next



Changes: Searching vor min/max uv´s of tri, then adding .5 texel for min-u/v, substracting .5 texel of every max-u/v

Cy