1
0
forked from 0ad/0ad
Commit Graph

87 Commits

Author SHA1 Message Date
d805e764c5 # Render unit silhouettes when behind buildings.
Fixes #144.
Start using stencil buffer.
Simplify materials a little.

This was SVN commit r9076.
2011-03-18 16:57:54 +00:00
d24c93237c # Initial version of terrain decal textures.
Rejig CModel to support non-mesh-based props.
Avoid redundant recomputation for non-moving CRenderableObjects.

This was SVN commit r9055.
2011-03-13 19:22:05 +00:00
18f44bebbc Add workaround for missing tree shadows on certain graphics drivers
This was SVN commit r9042.
2011-03-07 00:34:03 +00:00
4f724056d5 Remove some unused bits from CRenderer
This was SVN commit r8927.
2011-02-16 22:40:15 +00:00
fe21c5e023 # Rewrite fog-of-war rendering.
Disable shadows when only 2 TMUs available.
Clean up some other rendering code.

This was SVN commit r8882.
2011-02-03 01:12:24 +00:00
03c75100ab # Fix terrain blending logic.
Add terrain priority rendering mode in Atlas.
Fix terrain painting in Atlas to be less profligate with priority
values.
Support hotloading of blend textures.
Clean up some trivial things.

This was SVN commit r8872.
2011-01-29 16:31:48 +00:00
7ea522a484 # Add on-screen health bars
This was SVN commit r8241.
2010-10-02 12:41:29 +00:00
67a94572ec # Add new texture loading system with automatic compression.
Replace almost all texture uses with calls to the new system.
Add some anistropic filtering to terrain textures.
Let Atlas load terrain texture previews partly-asynchronously by
polling.
Fix inefficient texture colour determination for minimap.
Remove unused global g_TerrainModified.
Change GUI texcoord computation to be less efficient but to cope with
dynamic texture changes.
Fix GUI renderer effects leaving bogus colour state.

This was SVN commit r8099.
2010-09-10 21:02:10 +00:00
0f611042b1 # Support alt+enter to toggle fullscreen mode. Make game window resizable.
Refactor the video mode setting logic to cope better with dynamic
changes.

This was SVN commit r7606.
2010-06-03 19:07:59 +00:00
58e79bfdbe Force fancywater off if fragment shader extensions are not supported. See #270
This was SVN commit r7385.
2010-03-21 14:18:15 +00:00
7c2e9027c2 # Rewrite of the game's simulation system
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)

This was SVN commit r7259.
2010-01-09 19:20:14 +00:00
1743645fd3 Simplify the overly-complex CppDoc-breaking file headers
This was SVN commit r6832.
2009-04-18 17:51:05 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
0f9294ce17 Fixed some strict aliasing warnings
This was SVN commit r6252.
2008-07-19 00:36:42 +00:00
c0ed950657 had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).

it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.

after several hours, the code now requires fewer casts and less
guesswork.

other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.

This was SVN commit r5942.
2008-05-11 18:48:32 +00:00
af6694262a cleanup:
remove ONCE(ScriptingInit) constructs, replace with direct call from
GameSetup
revised GameSetup's InitScripting (organize into groups)
JSCollection: remove #define of two concrete collection types (made
typedef, moved to their respective entity.h and player.h)

This was SVN commit r5871.
2008-04-06 14:03:23 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
5e3e78ca78 # Fixed some graphical and scenario editor issues.
Atlas: Changed video format to 640x480 and losslessly compressed. Added
most-recently-used files list. Stopped switching sidebar when selecting
tools, since it was getting annoying. Added Slow playback mode. Fixed
crash when resetting sim while projectiles exist.
Renderer: Added JS-accessible renderer.shadowMapSize to override the
size of shadow maps.
ShadowMap: Changed default depth texture bits to 24, since that seems to
go faster (see #180).
PolygonSortModelRenderer: Made more similar to other renderers, so that
the renderer.sortAllTransparent=true mode works better.
Projectile: Fixed update, so it interpolates smoothly.
Entgraph: Fixed promotion detection.

This was SVN commit r4876.
2007-02-09 17:04:55 +00:00
173c56140c # Fixed skeletal animation algorithm.
* Skinning is done in a way that works when there's more than one bone
influencing a vertex.
 * PMDs now store vertexes in world-space instead of bind-space. (The
loader converts the old-version PMDs so they still work.)
 * Moved SkinPoint, SkinNormal into CModelDef so it could use them when
loading the old PMDs.
 * Made the FastNormals approach non-optional, so the inverse-transpose
bone matrices could be removed. Changed the explanation of why it's a
valid approach.
 * Quaternion: Made GetInverse assume that the quaternions have unit
length (which they do when they're representing 3D rotations).
 * lib: Added support for DDS files that aren't a multiple of 4x4 (most
useful for 1x1, 2x2, etc that are still powers of two).
 * Actor Viewer: Added white terrain texture to the minimal test mod, so
shadows are visible. Changed default so walk/run animations don't move
the unit along the ground.
 * Removed some redundant repetition in doc comments.
 * Removed some unnecessary #includes.

This was SVN commit r4696.
2006-12-15 16:09:30 +00:00
6ed4ad6519 Added a hotkey to toggle rendering of territory outlines. (Currently "T").
This was SVN commit r4675.
2006-12-05 02:08:52 +00:00
2f53eea71a Actor Viewer: Added controls for wireframe, background colour, move-when-walking. Reduced CPU usage when 'playing' things with no animation.
Color: Moved SColor* structs into SColor.h, so they can be used without
indirectly including CVector[34]D.
Terrain: Added 'base colour', for the Actor Viewer to be able to
modulate the colour of normally-white terrain.
Removed some "using namespace std" (because it doesn't make the code
easier to read, and it defeats the point of namespaces, and the rest of
the code doesn't do it).

This was SVN commit r4392.
2006-09-26 01:44:20 +00:00
c47d1cc663 CRenderer: Cleanup some remnants of object types for which the Submit() method has been removed.
This was SVN commit r4387.
2006-09-24 11:56:11 +00:00
c14765989e # Introduce a Scene abstraction that allows the renderer to query visibility from multiple virtual camera positions.
This is the first step towards fixing #142

This was SVN commit r4385.
2006-09-24 11:25:11 +00:00
a63f49e582 Add gameView.culling and renderer.skipSubmit for debugging purposes.
This was SVN commit r4382.
2006-09-23 16:04:54 +00:00
e0b68b7f9f Use AddLocalProperty in CRenderer.
This gets rid of lots of boiler-plate code in JSI_* functions.

This was SVN commit r4380.
2006-09-23 12:48:06 +00:00
09b87e84ec #Bugfix: Shadows appeared to be rendered one frame too late
close #141

The problem was that the shadow matrices were setup in BeginFrame, but
GraphicsView calls SetCamera after BeginFrame. The solution was to move
the shadow matrix setup into CRenderer::SetCamera.

This caused a second problem because RenderReflections/RenderRefractions
used SetCamera to change the OpenGL matrices. Solved this problem by
distinguishing explicitly between the camera used for the scene as a
whole and the camera used to configure OpenGL. The latter can be a
virtual camera for shadow or reflection rendering and similar
render-to-texture effects.

This was SVN commit r4330.
2006-09-14 20:06:21 +00:00
df1a779d76 # Updates to water rendering (more effects).
This was SVN commit r4318.
2006-09-10 05:31:41 +00:00
6db054f7dd # Add JS variable renderer.fancyWater to enable/disable fancy water rendering at runtime
This was SVN commit r4307.
2006-09-07 22:16:15 +00:00
c817566222 # housekeeping
replaced all (*) CStr / CStrW by-value params with const reference. hoo
boy.

please always perform this optimization (actually standard idiom) when
writing the code - it takes little work, tells the next guy that the
string won't be modified, and makes a large performance difference.

(* where possible.. a few require other changes and will follow later)

This was SVN commit r4151.
2006-07-20 14:37:58 +00:00
2b0e5d0b42 # Added parameters to control water murkiness.
This was SVN commit r4013.
2006-06-22 21:11:18 +00:00
d39a4fac21 Premake: include precompiled.h in the project; set up dependencies for Atlas projects.
# Attempted to make compilation faster
by including as little as possible in some .h files, and moving it into
.cpp.
Fixed BaseTechCollection memory leak.

This was SVN commit r3992.
2006-06-09 16:44:16 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +00:00
9124f7266c Tidied up some include paths
This was SVN commit r3929.
2006-06-02 01:01:39 +00:00
67ede785d5 Updates to water and a fix for a rendering bug with bar textures
This was SVN commit r3902.
2006-05-28 21:58:56 +00:00
106f59c5c7 # Added fancy water.
This was SVN commit r3897.
2006-05-28 02:13:32 +00:00
f0615df318 # Initial work on fancy water.
Also, horizon height (skybox vertical offset) can now be set from the
console with renderer.horizonHeight.

This was SVN commit r3893.
2006-05-25 05:46:17 +00:00
18eb72a25a Added Perlin noise class, which will be useful for water.
This was SVN commit r3871.
2006-05-17 03:53:54 +00:00
4879b98fc7 # Sky set can now be changed through the console.
This was SVN commit r3869.
2006-05-17 02:24:17 +00:00
275a73851c # Added sky box as well as repair, heal and trample actions.
Closes #31, #32, #37. Refs  #46.

This was SVN commit r3865.
2006-05-16 04:41:37 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
73506eb076 #Code cleanups related to renderer
Remove the OPT_NOPBUFFER and OPT_SHADOWCOLOR options and related
variables
since they weren't really used.

This was SVN commit r3694.
2006-03-26 17:46:18 +00:00
8fd256c458 #Use EXT_framebuffer_object when available
* noframebufferobject configuration in system.cfg can be used to
  disable EXT_fbo (in case drivers are flaky etc.)
* shadow texture size now honours the OpenGL maximum texture size as
reported
  by the implementation

This was SVN commit r3693.
2006-03-26 17:36:33 +00:00
e2bbd9a654 #Models receive shadows now, including self-shadows.
This is a huge patch, including:
* add a LitRenderModifier abstract base class for RenderModifiers with
  shadow+light
* add LitRenderModifiers for all types of models
* add STREAM_TEXGENTOUV1 to request generation of shadow map texcoords
  for models
* create facilities to pass the texture matrix from the
  RenderModifier (fragment stage) to the ModelRenderer (vertex stage)
* split ambient and diffuse terms of lighting until further down in the
  pipeline; this is necessary since shadowed regions receive only
ambient light
* small improvement in how RenderPathVertexShader scales to a greater
  number of vertex shaders

This was SVN commit r3690.
2006-03-26 00:54:20 +00:00
f903b83674 Add renderer.disableCopyShadow for debugging purposes.
Add renderer.depthTextureBits configuration value.

This was SVN commit r3518.
2006-02-15 23:50:24 +00:00
7dee30e24c - Terrain self-shadows (only noticeable with a low angle of sun)
- explicitly split ambient and diffuse
- add renderer.shadowZBias to bias depths in the depth texture
  and avoid flickering artifacts caused by Z fighting
- cantabrian_generated uses new light values so that shadows aren't
pitch
  black

This was SVN commit r3508.
2006-02-13 14:18:20 +00:00
9f055eddb0 Shadow rendering can use depth textures, as a preparation for
self-shadowing and shadows on models in general.
Usage of depth textures can be toggled using
?renderer.useDepthTexture = true/false in the JavaScript console.

This was SVN commit r3495.
2006-02-11 18:04:32 +00:00
66c9c1fbf5 Replace old shadow matrix calculation; the sun really is a parallel light
source now.

This was SVN commit r3488.
2006-02-11 00:26:40 +00:00
90bf4ae0a7 - add CBound::Render()
- fix CBound::Transform() math
- beginnings of new shadow bound calculations

This was SVN commit r3436.
2006-01-29 17:34:45 +00:00
f25de48559 - Seperate ViewCamera (eye position) and CullCamera (model culling, shadow
calculations) internally. Use ?gameView.lockCullCamera = true in the
console
  to move around while the CullCamera stays in place
- add CCamera::Render to visualize a camera's frustum
- use ?renderer.debugFrustum = true in the console to visualize the
frustum
  of the CullCamera

This was SVN commit r3405.
2006-01-22 19:12:30 +00:00
b889826a3d Some Linux compile fixes over the place.
Create TerrainRenderer, ShadowMap and WaterManager classes to divide
CRenderer's functions into more logical units.

This was SVN commit r3332.
2006-01-07 01:04:26 +00:00