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.
Change the shader itself so that the effects look nicer and are more
consistent across settings.
Rework the water mesh generation (simpler system). Fix a few issues.
May work oddly with Atlas since I haven't been able to compile yet.
Refs #1875 (maybe fix), Fixes#2077 (I'll assume it does), Fixes#2114
(assumption again), refs #48.
This was SVN commit r15473.
Fix a long-standing typo in TerrainRenderer for water rendering that
apparently had no effect.
Don't compress the water textures to make it look better. They will be
changed anyhow.
This was SVN commit r15461.
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.
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.
Remove waves for now as they were unsatisfactory.
Removes "shininess" as a water parameter as it was basically useless.
Add a button in Atlas to recompute water parameters so you can now see
fog in Atlas.
Fixes#1743, #1803 (invalid)
Refs #1875, #2114, #48.
This was SVN commit r14514.
Each GUI Page gets its own compartment and all ScriptInterfaces in the
same thread should now use the same JS Runtime.
This is required for the SpiderMonkey upgrade.
Check the ticket for details.
Closes#2241
Refs #1886
Refs #1966
This was SVN commit r14496.
Replaces glBegin/End with glDrawArrays, GL_QUADS with GL_TRIANGLES, and
replaces glPush/PopAttrib by resetting the viewport manually.
Adjusts GLSL shaders for these changes.
This was SVN commit r14152.
Replace unifont with CFont and CFontManager, since the h_mgr interface
was
needlessly inconvenient.
Load the font textures through CTextureManager, to support dynamic
reloading (e.g. when resetting GL state - see #741).
Add CFontMetrics as a convenient wrapper for code that just wants to
measure text.
Fixes#1117.
This was SVN commit r14016.
This fixes an error with autostart and smoothlos=true, where the system
defines were being accessed before the first rendered frame.
This was SVN commit r13923.
Use an arena allocator in ShaderModelRenderer::Render, to reduce
the allocation cost in STL containers.
Avoid unnecessary copying of std::vectors.
This was SVN commit r13911.
Switch all the constant strings in graphics code to use the new
variables.
This avoids the cost of instantiating CStrInterns at runtime every
frame.
This was SVN commit r13906.
CShaderDefines is designed to be efficient to copy and compare, but not
to construct. Conditional defines were constructing new CShaderDefines
for many models every frame.
Precompute all the possible conditional combinations of CShaderDefines
when a material is first loaded, so they can be looked up at no cost
when rendering.
This was SVN commit r13902.