This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
modding:developerinfo:streets [2018/02/08 11:17] 127.0.0.1 external edit |
modding:developerinfo:streets [2018/12/11 15:59] tom |
||
---|---|---|---|
Line 82: | Line 82: | ||
* ''sidewalkCurb'' | * ''sidewalkCurb'' | ||
* ''sidewalkWall'' | * ''sidewalkWall'' | ||
+ | |||
+ | Street materials with non-zero polygon offset are rendered without depth buffer write. Depth write can be forced with forceDepthWrite flag. | ||
+ | |||
+ | == Base Materials == | ||
+ | |||
+ | Base materials - like paving and sidewalks - require the following parameters: | ||
+ | |||
+ | <code lua> | ||
+ | function data() | ||
+ | return = { | ||
+ | order = 0 | ||
+ | params = { | ||
+ | -- more params | ||
+ | polygon_offset = { | ||
+ | factor = -2, | ||
+ | units = -2, | ||
+ | }, | ||
+ | type = "PHYS_TRANSPARENT_NRML_MAP" -- or non-transparent | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | == Overlay Materials == | ||
+ | |||
+ | Overlay materials - like markings, borders, bus lanes or tram tracks - require the following parameters: | ||
+ | |||
+ | <code lua> | ||
+ | function data() | ||
+ | return = { | ||
+ | order = 1 -- for multiple overlays set order appropriately | ||
+ | params = { | ||
+ | -- more params | ||
+ | alpha_test = { | ||
+ | alphaThreshold = 0.5, | ||
+ | preferAlphaToCoverage = false, | ||
+ | }, | ||
+ | polygon_offset = { | ||
+ | factor = -3, | ||
+ | units = -3, | ||
+ | }, | ||
+ | type = "PHYS_TRANSPARENT_NRML_MAP" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | == Material types == | ||
+ | |||
+ | Material types are renderered in this order: | ||
+ | |||
+ | <code> | ||
+ | REFLECTIVE, | ||
+ | REFLECTIVE_NRML_MAP, | ||
+ | REFLECTIVE_OP, | ||
+ | REFLECTIVE_NRML_MAP_OP, | ||
+ | PHYSICAL, | ||
+ | PHYSICAL_OP, | ||
+ | PHYSICAL_NRML_MAP, | ||
+ | PHYSICAL_NRML_MAP_CBLEND, | ||
+ | PHYSICAL_NRML_MAP_CBLEND_DIRT, | ||
+ | PHYSICAL_NRML_MAP_OP, | ||
+ | PHYSICAL_NRML_MAP_CBLEND_OP, | ||
+ | PHYSICAL_NRML_MAP_UV1_AO, | ||
+ | PHYSICAL_NRML_MAP_OP_UV1_AO, | ||
+ | PHYSICAL_GLOSS_ONLY, | ||
+ | PHYSICAL_OP_GLOSS_ONLY, | ||
+ | SKINNING_TEXTURED, | ||
+ | SKINNING_PHYS_CBLEND4, | ||
+ | SKINNING_PHYS_NRML_MAP_CBLEND4, | ||
+ | PHYSICAL_ALPHA_NRML_MAP, | ||
+ | PHYSICAL_ALPHA_NRML_MAP_OP, | ||
+ | PHYS_TRANSPARENT, | ||
+ | PHYS_TRANSPARENT_NRML_MAP, | ||
+ | PHYS_TRANSPARENT_NRML_MAP_CBLEND_DIRT, | ||
+ | PHYSICAL_NRML_MAP_CBLEND_DIRT_LOGO, | ||
+ | TRANSPARENT, | ||
+ | TRANSPARENT_DETAIL, | ||
+ | TRANSPARENT_NRML_MAP, | ||
+ | TRANSPARENT_OP, | ||
+ | TRANSPARENT_NRML_MAP_OP, | ||
+ | EMISSIVE, | ||
+ | LEAF_CARD, | ||
+ | BILLBOARD, | ||
+ | BILLBOARD_MULTI | ||
+ | </code> | ||
=== Assets === | === Assets === |