summaryrefslogtreecommitdiff
path: root/game
Commit message (Collapse)AuthorAge
* Billboard foliageDan Goodliffe3 days
| | | | | | Partition the instances by within/without the view frustum, then by proximity to the view point and within/without the sunlight shadow frustum. Use billboards for far away/out of view instances.
* Simplified FrustumDan Goodliffe11 days
| | | | | | | | | | | Don't need to differentiate between shadedBy by contains. The 5 plane/face variant is actually fine in both cases. For a perspective projection, the near plane is essentially at the origin and is handled by the left/right/top/bottom planes meeting. For the directional light case (orthographic projection) the near plane is omitted as objects in front of the clip space still cast shadows into it. Also includes a fix the distance calculation to not add .w, don't know where I got the idea this was right.
* Fix up the preFrame process to use both frustumsDan Goodliffe13 days
| | | | | | (camera and directional light frustums) This has made the whole preFrame process far more fiddly and repetitive than I'd like, but it does work. Maybe we can tidy it up later.
* Initial commit using tesselation shader to create curvesDan Goodliffe2026-01-31
| | | | Disables glslangValidator because of file extension mess up.
* Avoid out parameters with Ray::intersectSphereDan Goodliffe2025-04-24
|
* Avoid out parameters with Ray::intersectTriangleDan Goodliffe2025-04-24
|
* Fix all warnings game/network/*Dan Goodliffe2025-04-23
| | | | Mostly naming of variables.
* Add Asset interface to create an arbitrarily placed instanceDan Goodliffe2025-04-07
| | | | | InstanceProxy is returned out via a std::any containing a std::shared_ptr because any can only contain copyable things.
* Replace call to calc_vertex_normal_correctDan Goodliffe2025-04-05
| | | | | Same code copied inline, but adjusted to avoid normalising using Scalar which is an integral type.
* Add Renderable typed collection to GameState worldObjectsDan Goodliffe2025-03-23
|
* Make Collections::objects protected, extend interfaceDan Goodliffe2025-03-22
| | | | | Keeps all required features accessible, but through a controlled interface.
* Invert how shared/unique is specified for CollectionDan Goodliffe2025-03-22
| | | | Template param is a pointer now, typedefs added for ease.
* Add ManyPtr which tracks specified subclassesDan Goodliffe2025-03-22
| | | | | | This removes the need to repeated dynamic_cast the pointer. Provides interface which enforces the fastest option for the required types.
* Split Terrain::generateMeshes into smaller functionsDan Goodliffe2025-03-12
| | | | | | Also removes incorrect optimisation that a tile's AABB could be assumed from tile base position; in fact some faces cross the boundaries and the AABB needs to account for this.
* Cull terrain meshes from render that don't cast a shadow into the frustumDan Goodliffe2025-03-11
|
* Pass a Frustum to shadow renderersDan Goodliffe2025-03-11
| | | | The frustum might not be correct at this stage.
* Template AxisAlignedBoundingBox on unit typeDan Goodliffe2025-03-11
|
* Current tile in frustum as we loopDan Goodliffe2025-03-11
| | | | Chunk by surface only, render if visible in frustum
* Construct terrain tile AxisAlignedBoundingBox during mesh generationDan Goodliffe2025-03-11
| | | | | No surface is simply the tile bounds, but with a surface, it's constrained to just the bounds of the surface itself.
* Only render terrain tiles which are visible in the frustumDan Goodliffe2025-03-11
|
* Create AxisAlignedBoundingBoxDan Goodliffe2025-03-11
| | | | Used to define the extents of GeoData mesh
* Pass frustum into render functionsDan Goodliffe2025-03-07
| | | | Support for culling objects outside the view frustum
* Work around clang thinking this is unused in lambdasDan Goodliffe2025-03-01
|
* Split meshes by surface and tileDan Goodliffe2025-02-26
| | | | | Tile is derived per face based on the first vertices point rounded to roughly 1km.
* Improve Terrain::generateMeshes performanceDan Goodliffe2025-02-25
| | | | | Creates mesh per surface based on a single buffer of all vertices and a collection of per surfuce indices. Makes ColourBias a uniform instead of a vertex attribute.
* Don't rely on triangle centroid not already having a surfaceDan Goodliffe2025-02-24
|
* Improve number of segments in LinkCurve basesDan Goodliffe2025-02-23
|
* Process set height as required in chunks of target vertexDan Goodliffe2025-02-23
|
* Less allocy/work set based surface/recursive height settingDan Goodliffe2025-02-23
|
* Add adjusted boundary vertices to new/changes/boundary listsDan Goodliffe2025-02-23
|
* Expand new verts collection onceDan Goodliffe2025-02-18
| | | | Before doing vertex normal recalc only, not on every insert
* Only build/run GeoDataMesh::sanityCheck for debugDan Goodliffe2025-02-17
|
* Refactor GeoData::setHeights until a struct made of a logical breakdown of ↵Dan Goodliffe2025-02-17
| | | | the process
* Fixes and tests to new range helpersDan Goodliffe2025-02-15
|
* Range adaptor to make triangle strip triplesDan Goodliffe2025-02-15
|
* Use new helpers to simplify close entity search in GeoData::setPointDan Goodliffe2025-02-14
|
* Move basic setHeights lambdas into proper helper functionsDan Goodliffe2025-02-13
|
* Replace mesh generation counter with afterChange eventDan Goodliffe2025-02-10
|
* Combine GeoData and Terrain class hierarchiesDan Goodliffe2025-02-09
|
* Split GeoData mesh basics into a subclassDan Goodliffe2025-02-09
| | | | Declutters the class for terrain related things
* Move lots of geoData helpers into libDan Goodliffe2025-02-09
|
* Initial commit setting terrain during network constructionDan Goodliffe2025-02-09
| | | | This is all in the wrong place, it shouldn't be part of the network interface.
* Big of validation on getSurfaceDan Goodliffe2025-02-09
|
* Improve logging and fault detection during mesh mutationDan Goodliffe2025-02-08
|
* Set height when reusing adjacent verticesDan Goodliffe2025-02-08
|
* Verify an edge can be flippedDan Goodliffe2025-02-06
| | | | | Asserts the resulting triangle pair would be both still face up, not the case if the original triangles do not form a convex polygon
* Update PointFace _face cache as required instead of erroringDan Goodliffe2025-02-06
|
* Check all adjacent vertex before edges when cutting triangle strip edgeDan Goodliffe2025-02-03
|
* Flip edges if better instead of splitting them when cutting triangle strip edgeDan Goodliffe2025-02-02
|
* Add distance helperDan Goodliffe2025-01-21
| | | | Works with integer positions, first template param allows forcing to N dimensions