projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deac3e6
)
make grass sprites a function of map area
author
hgn
<hgodden00@gmail.com>
Tue, 17 Jan 2023 02:02:48 +0000
(
02:02
+0000)
committer
hgn
<hgodden00@gmail.com>
Tue, 17 Jan 2023 02:02:48 +0000
(
02:02
+0000)
maps_src/mp_gridmap.mdl
patch
|
blob
|
history
world_gen.h
patch
|
blob
|
history
diff --git
a/maps_src/mp_gridmap.mdl
b/maps_src/mp_gridmap.mdl
index 1f1079f43f015321f1e7622a6bff54136b94c0d6..260b43f12237cea3c8c5ee1239dec987b242c0bc 100644
(file)
Binary files a/maps_src/mp_gridmap.mdl and b/maps_src/mp_gridmap.mdl differ
diff --git
a/world_gen.h
b/world_gen.h
index 47ed5ee9c9b64624c20bf060c90921f3bb7d8037..b5481c044f100effcb99f2ab15805e34616bd5d0 100644
(file)
--- a/
world_gen.h
+++ b/
world_gen.h
@@
-56,7
+56,12
@@
VG_STATIC void world_apply_procedural_foliage( struct world_material *mat )
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 );