Commit graph

586 commits

Author SHA1 Message Date
Michaël Lemaire dbcaf5fe90 Refectored PI constants definitions + added Maths::modInRange 2015-12-31 00:36:22 +01:00
Michaël Lemaire 92ec8bf9b3 Fixed camera mode setting 2015-12-30 20:32:26 +01:00
Michaël Lemaire b574483d34 Renamed some "main" variables
they may cause compile errors on mingw
2015-12-30 20:23:24 +01:00
Michaël Lemaire e5372c61e4 Renamed Time to Timing
because Time.h would clash with standard lib time.h
on case insensitive file systems
2015-12-30 20:20:27 +01:00
Michaël Lemaire 958fd0121b Added camera focus on sun while moving it 2015-12-30 20:14:16 +01:00
Michaël Lemaire b9a51bb2be Fixed precision problem in daytime management 2015-12-30 19:29:15 +01:00
Michaël Lemaire c99973a42b Added mouse control over sun and moon positions 2015-12-30 01:46:47 +01:00
Michaël Lemaire c1d6a3261c Removed global string include in system_global.h 2015-12-30 00:43:35 +01:00
Michaël Lemaire 61a43410db Refactored CelestialBodyDefinition, with new sun/moon widget 2015-12-30 00:20:20 +01:00
Michaël Lemaire 06cd5e31fd Tweaked sun radius 2015-12-29 22:34:05 +01:00
Michaël Lemaire 391f1a7f41 Added FractalNoise value to OpenGLVariable 2015-12-24 01:21:12 +01:00
Michaël Lemaire 77ba82408d Coding style 2015-12-24 00:16:50 +01:00
Michaël Lemaire d88cb29f4c Refactored OpenGLVariable with pimpl and smart pointers 2015-12-23 23:40:19 +01:00
Michaël Lemaire 3934077552 Fixed some artifacts in atmosphere rendering
when sun was near horizon
2015-12-21 17:48:30 +01:00
Michaël Lemaire 366ac4a6c9 opengl: Added missing irradiance from sky 2015-12-18 00:59:50 +01:00
Michaël Lemaire 351a58f69b Fixed render tests for near frustum tessellation 2015-12-18 00:41:22 +01:00
Michaël Lemaire f2d38f7165 Fixed atmosphere model producing artifacts below ground surface 2015-12-17 19:51:40 +01:00
Michaël Lemaire 0ab1719d25 Added better render tests for atmosphere artifacts 2015-12-17 19:29:04 +01:00
Michaël Lemaire e9fcd6b2a5 Fixed int/double old-style casts 2015-12-17 01:13:20 +01:00
Michaël Lemaire b51ce3426d Fixed coding style 2015-12-16 01:33:02 +01:00
Michaël Lemaire b376d7f8e9 Added ColorNode 2015-12-16 01:32:25 +01:00
Michaël Lemaire 990d28d09d Fixed DefinitionNode::findChildByName 2015-12-16 00:38:28 +01:00
Michaël Lemaire 62a7f746ea Fixed NoiseGenerator.forceValue 2015-12-16 00:36:30 +01:00
Michaël Lemaire c5d73f96a2 Small source code improvements 2015-12-16 00:31:07 +01:00
Michaël Lemaire aecd3dcdf3 pimpl for PackStream 2015-12-15 23:07:19 +01:00
Michaël Lemaire 86e6539af9 Fixed a potential segfault at program exit 2015-12-16 10:36:21 +01:00
Michaël Lemaire d2b4a1ea5e vegetation: Removed index variable in impostor shader
It was used for texture coordinates, but is now
precomputed in the vertex array
2015-12-15 00:14:06 +01:00
Michaël Lemaire da5219c01f Fixed near-frustum auto-tessellation yielding a back-facing sub-triangle 2015-12-14 22:26:13 +01:00
Michaël Lemaire 26cba26847 Do not rasterize vegetation when there is no layer 2015-12-14 22:20:28 +01:00
Michaël Lemaire a36570f5a6 Removed obsolete QML extension for QtCreator 2015-12-14 19:39:00 +01:00
Michaël Lemaire eda562f92e Fixed redo binding to Ctrl+Y 2015-12-13 22:25:46 +01:00
Michaël Lemaire 84ecb99b12 definition: Fixed undo not generating reverse diffs 2015-12-13 20:32:26 +01:00
Michaël Lemaire e0ba87e4e5 Added mandatory logger information 2015-12-13 20:08:38 +01:00
Michaël Lemaire d6444028f9 Added some convenience to set and watch scenery nodes 2015-12-13 19:56:00 +01:00
Michaël Lemaire 8ff83d48e7 OpenGLTerrain does not use Qt containers anymore 2015-12-13 19:06:27 +01:00
Michaël Lemaire 1d9d24b958 vegetation: Fixed segfault in unit test 2015-12-13 17:47:22 +01:00
Michaël Lemaire 4a710c0977 Merge branch 'master' into vegetation
Conflicts:
	src/interface/commandline/tests.cpp
	src/render/opengl/OpenGLPart.h
	src/render/opengl/OpenGLRenderer.cpp
	src/render/opengl/OpenGLRenderer.h
	src/render/opengl/OpenGLShaderProgram.h
	src/render/opengl/OpenGLSharedState.h
	src/render/software/SoftwareCanvasRenderer.h
2015-12-13 17:16:26 +01:00
Michaël Lemaire b54bd65df9 Added DefinitionWatcher.startWatching 2015-12-11 01:39:47 +01:00
Michaël Lemaire 9cece93ec1 Refactored opengl parts 2015-12-11 01:12:55 +01:00
Michaël Lemaire 7d4989b670 using namespace std 2015-12-11 00:36:50 +01:00
Michaël Lemaire 479dcb03ac Added opengl resources deleting at exit (textures, arrays...) 2015-12-10 23:41:42 +01:00
Michaël Lemaire c5950f810f Merge branch 'master' into vegetation
Conflicts:
	src/definition/Scenery.cpp
	src/interface/commandline/tests.cpp
2015-12-10 19:48:42 +01:00
Michaël Lemaire 2d6c0f34c3 Using c++ random generators instead of cstdlib one 2015-12-10 19:40:39 +01:00
Michaël Lemaire 230fd6644e Merge branch 'master' into vegetation
Conflicts:
	src/basics/Color.inline.cpp
2015-12-09 00:40:47 +01:00
Michaël Lemaire 9c774f3817 Fixed noise shader function using deprecated "texture2D" 2015-12-09 00:34:56 +01:00
Michaël Lemaire 1f656a6f86 Added missing export flag on classes 2015-12-09 00:34:08 +01:00
Michaël Lemaire c12cd91f9b Removed header inlining of Vector3 and Color methods
This made cross-platform compiling and profiling more complicated
2015-12-09 00:32:29 +01:00
Michaël Lemaire 9196be4c05 Merge branch 'master' into vegetation
Conflicts:
	src/render/opengl/OpenGLShaderProgram.cpp
	src/render/opengl/OpenGLShaderProgram.h
	src/render/opengl/opengl_global.h
2015-12-08 01:28:15 +01:00
Michaël Lemaire f242f55f81 Switched OpenGL to core profile 2015-12-07 23:32:55 +01:00
Michaël Lemaire e346f07c22 Merge branch 'master' into vegetation
Conflicts:
	src/render/opengl/OpenGLRenderer.cpp
	src/render/opengl/OpenGLRenderer.h
	src/render/opengl/OpenGLShaderProgram.cpp
	src/render/opengl/OpenGLShaderProgram.h
	src/render/opengl/OpenGLSharedState.cpp
2015-12-04 00:04:07 +01:00
Michaël Lemaire c7e868ef11 Better OpenGL error checking + opengl header refactoring 2015-12-03 23:04:50 +01:00
Michaël Lemaire d2efb599d9 Made the vegetation impostors face the camera 2015-11-29 19:18:36 +01:00
Michaël Lemaire 9d7a7a0ff7 Added vegetation impostors to OpenGL renderer
This is currently an unoptimized and broken version, to be improved
2015-11-25 23:15:58 +01:00
Michaël Lemaire 9e3c43f510 Merge branch 'master' into vegetation 2015-11-24 00:59:28 +01:00
Michaël Lemaire 5e9b37d52c Fixed small memory leaks and uninitialized values 2015-11-24 00:58:09 +01:00
Michaël Lemaire 01992a0019 Fixed vegetation definition, due to layers refactoring in master 2015-11-20 01:16:48 +01:00
Michaël Lemaire 8cf2881a73 Merge branch 'master' into vegetation 2015-11-20 01:10:06 +01:00
Michaël Lemaire 2b65f1d26a Refactored layers system to work better as DefinitionNode
It now features undo/redo of layer creation and removal
2015-11-20 01:07:31 +01:00
Michaël Lemaire 5f0b3734cf Switched to C++-14 2015-11-20 01:04:21 +01:00
Michaël Lemaire 236db15fdb Merge branch 'master' into vegetation 2015-11-18 22:22:30 +01:00
Michaël Lemaire 10f8f46ca6 Fixed CanvasPortion using the same temp files across processes 2015-11-18 22:22:09 +01:00
Michaël Lemaire dd7baf6db5 Merge branch 'master' into vegetation 2015-11-18 19:41:54 +01:00
Michaël Lemaire 6166031c8b Speeded up compile time
Reworked *_global.h heavy inclusions
2015-11-18 19:37:00 +01:00
Michaël Lemaire 63a9f780ca Merge branch 'master' into vegetation 2015-11-18 18:39:50 +01:00
Michaël Lemaire 65b4cd150c Fixed render camera size being inconsistent between renderers 2015-11-18 18:39:31 +01:00
Michaël Lemaire 394ff3b0ae Format 2015-11-18 17:22:33 +01:00
Michaël Lemaire e2d03642f4 Added some vegetation rendering optimizations 2015-11-10 01:12:14 +01:00
Michaël Lemaire f990ec4032 Added control of perspective correction
This allows for some optimization in render tests and
improves low-quality render times
2015-11-10 00:34:19 +01:00
Michaël Lemaire 159e0f7e81 Optimized vegetation branches rendering 2015-11-10 00:15:30 +01:00
Michaël Lemaire 9a096ec329 Merge branch 'master' into vegetation
Conflicts:
	src/basics/Disk.cpp
	src/basics/Disk.h
	src/basics/SpaceSegment.cpp
	src/definition/DefinitionNode.cpp
	src/definition/DefinitionNode.h
	src/definition/Scenery.cpp
	src/definition/Scenery.h
	src/definition/SurfaceMaterial.cpp
	src/definition/SurfaceMaterial.h
	src/definition/TextureLayerDefinition.cpp
	src/definition/definition_global.h
	src/interface/commandline/tests.cpp
	src/render/opengl/OpenGLRenderer.cpp
	src/render/software/SoftwareCanvasRenderer.cpp
	src/render/software/SoftwareCanvasRenderer.h
	src/render/software/SoftwareRenderer.h
	src/render/software/TerrainRasterizer.cpp
	src/render/software/TerrainRasterizer.h
	src/render/software/TerrainRenderer.h
	src/render/software/software_global.h
2015-11-09 22:38:00 +01:00
Michaël Lemaire 88d2a78b70 Enforced coding style using clang-format 2015-11-09 22:30:46 +01:00
Michaël Lemaire 72877c4361 Tweaked vegetation rendering, and improved render tests 2015-11-09 01:07:33 +01:00
Michaël Lemaire bdb2a3edb8 Merge branch 'master' into vegetation 2015-11-08 23:33:09 +01:00
Michaël Lemaire d82fc73531 Small optimizations (use reference to avoid object copy) 2015-11-08 23:32:52 +01:00
Michaël Lemaire 1e12b8ac9c vegetation: Now using sphere cap for leaves, to avoid flat effect 2015-11-04 01:08:48 +01:00
Michaël Lemaire f68bba75bb Merge branch 'master' into vegetation 2015-11-02 23:40:00 +01:00
Michaël Lemaire dc27590496 Improved estimated rendering time 2015-11-02 23:39:34 +01:00
Michaël Lemaire 2560fe2c53 Fixed holes in vegetation rendering 2015-11-02 23:00:02 +01:00
Michaël Lemaire 68945111d1 Improved vegetation rendering
- Added early check on terrain height range during iteration
- Added test render of vegetation model
- Tweaked basic tree model
2015-11-02 20:14:35 +01:00
Michaël Lemaire cd006e1093 Fixed vegetation renderer being randomly enabled 2015-10-19 19:14:45 +02:00
Michaël Lemaire 030be52f6f Merge branch 'master' into vegetation
Conflicts:
	src/definition/definition.pro
	src/render/software/software.pro
2015-10-19 17:40:17 +02:00
Michaël Lemaire ca7bd84308 Simplified project files + lazy init of data files 2015-10-19 01:39:22 +02:00
Michaël Lemaire d937bd08f6 vegetation: Added basic distribution algorithm 2015-10-19 00:30:20 +02:00
Michaël Lemaire 0ddec2393d Merge branch 'master' into vegetation 2015-10-19 00:29:47 +02:00
Michaël Lemaire 75e32beea7 Added NoiseNode 2015-10-19 00:26:25 +02:00
Michaël Lemaire 48dc1a8f25 Refactored vegetation presence 2015-10-18 22:15:19 +02:00
Michaël Lemaire cd7f30ecae Add ability to disable vegetation rendering
It is disabled in opengl rendering for now
2015-10-18 17:35:42 +02:00
Michaël Lemaire b430f6037e First draft of vegetation layers (WIP) 2015-10-18 17:26:19 +02:00
Michaël Lemaire 52bad18d26 Added "backface culling" and "previous fragment" in rasterizers
Backface culling speeds up rasterization
Previous fragment will be used later by vegetation rasterizer
2015-10-16 00:51:46 +02:00
Michaël Lemaire ac1b6a909b Extracted RayCastingResult header to speed-up compiling 2015-10-16 00:28:07 +02:00
Michaël Lemaire e81487ae08 Added safety offset on lighting
This avoids shadow algorithm to hit the surface it is currently checking
2015-10-16 00:14:54 +02:00
Michaël Lemaire cafa9b4c74 Added missing SurfaceMaterial::copy 2015-10-15 20:28:05 +02:00
Michaël Lemaire 2b3ecc7e35 Added geometry primitives 2015-10-15 20:21:32 +02:00
Michaël Lemaire 91cd564c59 Added SpaceGridIterator for SpaceSegment 2015-10-15 20:01:08 +02:00
Michaël Lemaire a91fa41f8f Added Vector3::randomInSphere
For future use in vegetation
2015-10-15 19:51:24 +02:00
Michaël Lemaire cd144b886c Added TimeManager with basic wind control for videos 2015-10-15 17:52:03 +02:00
Michaël Lemaire c62cf3a0a4 Improved "near_frustum" render test 2015-10-09 00:55:36 +02:00
Michaël Lemaire 2be80bf8e2 Fixed aerial perspective being applied at wrong location in clouds
It was applied at the enter point of the walking algorithm, which
was the camera when it was inside a cloud layer.

Now it is applied at the first found segment, which is still not
optimal but better.

The bruneton model was also fixed to not produce black results for
aerial perspective exactly at the camera location.
2015-10-09 00:43:32 +02:00
Michaël Lemaire a5c36f90f0 Fixed CLI overriding daytime even when not specified 2015-10-08 23:48:19 +02:00
Michaël Lemaire 3fc8b1c98f Added automatic tessellation near camera frustum culling
This allows the camera nearer the ground
and fixes holes in lower quality renders
2015-10-08 19:20:44 +02:00