FinishSurfaces(): Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
add
 
Tels (talk | contribs)
m update
Line 3: Line 3:
This is a method inside the closed-source part of the idtech4 engine. It '''doubles two-sided surfaces and calculates the shadow hull'''.
This is a method inside the closed-source part of the idtech4 engine. It '''doubles two-sided surfaces and calculates the shadow hull'''.


twosided surfaces are simply get their data doubled, so they get rendered twice, once from front and once fro back.
twosided surfaces are simply get their data doubled, so they get rendered twice, once from front and once from back.


'''FinishSurfaces()''' doubles the data either by:
'''FinishSurfaces()''' doubles the data by doubling the entire surface, copying the data (flipped normals, tangents, reverse indices for each tris). and appending the surface at the end.
 
# doubling the entire surface, copying the data there flipped, and appending the surface at the end
# or by duplicating the data and tacking it at the end of the original surface
 
It is a bit unclear when which method is choosen, because an ivy model with 12 tris in one surface gets the data duplicated in the surface itself, while a combined model with one surface of 862 tris gets the data tacked at the end as a new surface.


== See also ==
== See also ==

Revision as of 11:05, 2 February 2011

FinishSurfaces()

This is a method inside the closed-source part of the idtech4 engine. It doubles two-sided surfaces and calculates the shadow hull.

twosided surfaces are simply get their data doubled, so they get rendered twice, once from front and once from back.

FinishSurfaces() doubles the data by doubling the entire surface, copying the data (flipped normals, tangents, reverse indices for each tris). and appending the surface at the end.

See also