xubingyue / softart

Automatically exported from code.google.com/p/softart
Other
0 stars 0 forks source link

View frustum culling #106

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Description:
Add a view frustum culling before clipping to eliminate triangles complete 
outside view frustum.
The code looks like this:
bool frustum_culling(float4 pos0, float4 pos1, float4 pos2)
{
    float4 t0 = saturate(pos0.xyxy * float4(-1, -1, 1, 1) - pos0.w);
    float4 t1 = saturate(pos1.xyxy * float4(-1, -1, 1, 1) - pos1.w);
    float4 t2 = saturate(pos2.xyxy * float4(-1, -1, 1, 1) - pos2.w);
    float4 t = t0 * t1 * t2;
    return !any(t);
}

Original issue reported on code.google.com by minmin.gong on 27 Jul 2011 at 5:50

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 27 Jul 2011 at 11:54

GoogleCodeExporter commented 8 years ago
This issue was updated by revision 335905ef679c.

Description.
Add view frustum culling before clipper.

Original comment by minmin.gong on 27 Jul 2011 at 11:59

GoogleCodeExporter commented 8 years ago

Original comment by minmin.gong on 27 Jul 2011 at 12:00

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 15 Dec 2011 at 3:32

GoogleCodeExporter commented 8 years ago
This issue was updated by revision ae3a3f12d8c0.

SASL:
  Optimized pety_t::get(builtin_types).
  Performace factor is 1.02.

Original comment by wuye9036 on 5 Jul 2012 at 5:05