1
0
forked from 0ad/0ad
Commit Graph

10 Commits

Author SHA1 Message Date
d1fb66d2a7 Cleanups BoundingBoxAxisAligned and fixes coding styles a bit.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1951
This was SVN commit r22372.
2019-06-12 20:23:14 +00:00
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
eb7955599a Optimise silhouette rendering.
Do some intersection tests on the CPU so that the silhouette render
passes only have to draw models/patches that might actually contribute
to silhouettes, saving the CPU and GPU cost of rendering more objects
than necessary.

This was SVN commit r15483.
2014-07-03 01:00:25 +00:00
b1b96a89d6 Fix culling for shadows and reflections.
Previously we had a single culling frustum based on the main camera, and
any object outside the frustum would never get rendered, even if it
should actually contribute to shadows or reflections/refractions. This
caused ugly pop-in effects in the shadows and reflections while
scrolling.

Extend the renderer to support multiple cull groups, each with a
separate frustum and with separate lists of submitted objects, so that
shadows and reflections will render the correctly culled sets of
objects.

Update the shadow map generation to compute the (hopefully) correct
bounds and matrices for this new scheme.

Include terrain patches in the shadow bounds, so hills can cast shadows
correctly.

Remove the code that tried to render objects slightly outside the camera
frustum in order to reduce the pop-in effect, since that was a
workaround for the lack of a proper fix.

Remove the model/patch filtering code, which was used to cull objects
that were in the normal camera frustum but should be excluded from
reflections/refractions, since that's redundant now too.

Inline DistanceToPlane to save a few hundred usecs per frame inside
CCmpUnitRenderer::RenderSubmit.

Fixes #504, #579.

This was SVN commit r15445.
2014-06-25 01:11:10 +00:00
fe3315376c Add BoundingSphere, SOverlaySphere.
BoundingSphere is similar to a bounding box, but more spherical.

SOverlaySphere is useful for visualising BoundingSphere (it's quite
inefficient and should only be used for debug functionality).

Normalise the camera frustum clipping planes, so that IsSphereVisible
gives the correct result.

This was SVN commit r15261.
2014-06-01 18:05:46 +00:00
vts
1c005b0c0e Fixed AABB to OBB transformation resulting in NaN basis vectors when the AABB size in one or more dimensions is zero. Fixes #1121.
This was SVN commit r11928.
2012-05-31 23:17:15 +00:00
vts
305723f9a7 Prevent AABB/frustum intersections from blowing up on empty input bounds. Fixes #1027.
This was SVN commit r11441.
2012-04-05 22:29:01 +00:00
7fa6afac37 Corrects some Doxygen comments and adds a few others of interest.
This was SVN commit r11209.
2012-03-01 03:55:05 +00:00
db85833655 More GLES compatibility.
Move more rendering code to shader API.

This was SVN commit r11050.
2012-02-12 13:20:49 +00:00
vts
85186c98b2 Better selection boxes. Closes #914, #295, #810.
This was SVN commit r10593.
2011-11-25 06:36:13 +00:00