Commit Graph

41 Commits (8f90f8a3b8696a2cc92860d825d2f87dcb498465)

Author SHA1 Message Date
wareya 94f695cffc Fix #4452 and remove dead code 7 years ago
wareya 6277f5511c fix #3876 and #3993 7 years ago
scrawl 7b4add2ae4 Fall back to non-shader material if creating the shader fails
Also fixes an uncaught exception that will break the whole game.
7 years ago
scrawl 088d5604bf Use a shader if required to display the composite map
Fixes composited terrain not respecting the 'clamp lighting' setting.
8 years ago
scrawl 7f5beb3172 Remove unused includes 8 years ago
scrawl 5044816770 Remove unused code 8 years ago
scrawl b1d4bb5708 Add CompositeMapRenderer
Temporarily render all terrain using composite maps for testing purposes
8 years ago
scrawl eef63a880a terrain: use a custom drawable for multi-pass render instead of osgFX::Effect
osgFX::Effect is awkward to use because of the lazy-definition of passes, no support for compileGLObjects, useless 'Technique' abstraction and having to define silly methods like 'effectAuthor()'

Handling the multi-pass rendering inside the Drawable also avoids redundant culling tests against the same bounding box for each pass.
8 years ago
scrawl 62cc091414 Fix incorrect setting of TexMat in terrain material 8 years ago
scrawl 157c11398d Add terrain parallax mapping 9 years ago
scrawl 3f08cbff71 Share the state attributes for terrain techniques
Reduces the total amount of GL calls / frame by about 14% - 50% depending on the scene.
9 years ago
scrawl 0db7163363 Add specular mapping for terrain 9 years ago
scrawl 6a0ac824bd Fix terrain error in OpenCS 9 years ago
scrawl ca0e1fe0e0 Set the osg::Material on the terrain root node 9 years ago
scrawl 6000e48bba Add terrain shaders and normal map support
Textures with _n filename suffix are automatically recognized as terrain normal maps.
9 years ago
scrawl ef18f4217f Terrain: create 4x4 terrain chunks per ESM::Cell to improve performance
Improves performance because the number of splatting layers per chunk is reduced, and finer grained frustum culling can be done.
9 years ago
scrawl 95cf13e3f2 Terrain: make the blendmapSize and layerTileSize in FixedFunctionTechnique configurable 9 years ago
scrawl b3f5ac5dbb Include cleanup 10 years ago
scrawl 98571148b0 Remove custom license for terrain code
Now that it's no longer a stand-alone component, there's not much point in custom licensing it.
10 years ago
scrawl cd47dff196 Minor cleanup 10 years ago
scrawl 5666e02546 Fix for dark terrain in some cases 10 years ago
scrawl cdd0623009 Terrain rendering 10 years ago
dteviot e197f5318b fixing MSVC 2013 warning C4244: & C4305
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
10 years ago
jacmoe ee574e08ef MIT License header added to all terrain component files. 10 years ago
scrawl e25fa6c157 Refactor non-distant land terrain path to a grid based implementation (Fixes #1562) 11 years ago
scrawl c018319940 Addition to 7c9c0830a96: don't create useless BaseWhite clones 11 years ago
slothlife f33559fead Fixes for MSVC warnings, less overall changes
Kept some fixes from the first round of review. Found out that several
targets weren't being built with the same basic warnings disabled.
Disabled a few warnings for external libraries specifically, rather than
applying them to all targets.
11 years ago
slothlife c160a04ede Revert "Fixes for warnings when building with MSVC"
This reverts commit 46eb20b98c.
11 years ago
slothlife 46eb20b98c Fixes for warnings when building with MSVC
Most warnings are innocuous (wrong type-specifier for forward
declarations, conversion of literals into unsigned integers, warnings
about methods optimized out), but I believe actual bugs were revealed in
vartypedelegate.cpp and combat.cpp.
11 years ago
scrawl 1d926816b5 Terrain: background load blendmaps & layer textures. Refactor QuadTree update. 11 years ago
scrawl 64c9932597 Terrain: remove hard dependency on shiny - can now be compiled without it (fixed function) 11 years ago
scrawl c9e349f60f Terrain: support alternate coordinate systems. Get rid of LoadingListener for now 11 years ago
scrawl ce6aab89cf Fix a possible permutation issue 11 years ago
scrawl c64dc2c831 Terrain specular mapping: use a "_diffusespec" postfix to indicate specular information is present in the alpha channel. Use alpha directly instead of 1-alpha. 11 years ago
scrawl 5fd98d7c3a Add an assertion 11 years ago
scrawl 18c002a21d Fix an awful typo. 11 years ago
scrawl 69c0bb1723 Add normal, specular & parallax mapping for terrain 11 years ago
scrawl 5f7e6f7b10 Fix a material issue, layers per pass wasn't entirely correct 12 years ago
scrawl 8c8653160d Crash fix, material fix 12 years ago
scrawl ebf9debb80 Enabled terrain self shadows, implemented getHeightAt, some optimizations 12 years ago
scrawl e27437f8ed New terrain renderer - improvements:
- Consistent triangle alignment, fixes a noticable crack near the census and excise office. Note that alignment is still not the same as vanilla. Vanilla uses a weird diagonal pattern. I hope there aren't more trouble spots that will force us to replicate vanilla, but at least we can do that now.
 - Fixes several blending issues and cell border seams
 - Fix map render to use the terrain bounding box instead of an arbitrary height
 - Different LODs are now properly connected instead of using skirts
 - Support self shadowing
 - Normals and colors are stored in the vertices instead of a texture, this enables per-vertex lighting which should improve performance, fix compatibility issues due to the PS getting too large and mimic vanilla better
 - Support a fixed function fallback (though the splatting shader usually performs better)
 - Designed for distant land support - test: https://www.youtube.com/watch?v=2wnd9EuPJIY - we can't really enable this yet due to depth precision issues when using a large view distance
12 years ago