int count = 0;
- for( int i=0;i<100000;i++ )
+ float area = volume[0]*volume[2];
+ u32 particles = 0.08f * area;
+
+ vg_info( "Map area: %f. Max particles: %u\n", area, particles );
+
+ for( int i=0;i<particles;i++ )
{
v3f pos;
v3_mul( volume, (v3f){ vg_randf(), 1000.0f, vg_randf() }, pos );
ray_hit hit;
hit.dist = INFINITY;
- if( ray_world( pos, (v3f){0.0001f,-1.0f,0.0001f}, &hit ))
+ if( ray_world( pos, (v3f){0.0f,-1.0f,0.0f}, &hit ))
{
struct world_material *m1 = ray_hit_material( &hit );
if((hit.normal[1] > 0.8f) && (m1 == mat) && (hit.pos[1] > 0.0f+10.0f))
vg_release_thread_sync();
+#if 0
/*
* Setup scene collider
*/
-
reset_player( 1, (const char *[]){"start"} );
+#endif
}
VG_STATIC void world_process_resources(void)