Index: [thread] [date] [subject] [author]
  From: teunis <teunis@computersupportcentre.com>
  To  : ggi-develop@eskimo.com
  Date: Wed, 19 Aug 1998 19:34:39 -0700 (MST)

Re: LibGGI3D RFC

On Wed, 19 Aug 1998, Jon M. Taylor wrote:

[clip]
> > If yes, wouldn't that break gouraud shading?
> 
> 	Not if you do it right.  If the clipper described above were to
> interpolate the vertex normals of the pre-clipped triangle along the two
> clipped sides, it could compute the effective vertex normals of the two
> new triangle vertices which would be created by the clip.  This allows you
> to get the exact same effective shading.

I just thought of a solution :)

with each "render" function include a "split" function!

ie:
int split_triangles([source triangle data],
		    float sx1, float sy1, float sz1,
		    float sx2, float sy2, float sz2,
		    [pointer -> resulting triangle 1 data],
		    [pointer -> resulting triangle 2 data]);

1. it's best if [triangle data] were a structure or the stack's gonna
	get spammed!
2. (sx1,sy1,sz1) - (sx2,sy2,sz2) is a line defining the triangle split.
	[it's simple to split a triangle]

What do you think?  That way the -renderer- can describe how to split the
data up!

G'day, eh? :)
	- Teunis

Index: [thread] [date] [subject] [author]