Commit Graph

539 Commits

Author SHA1 Message Date
Lasse Öörni
9e871c1987 Removed automatic viewport reset on setting rendertarget to eliminate redundant API calls. However Graphics::ResetRenderTargets() resets the viewport. 2011-12-31 15:05:08 +00:00
Lasse Öörni
d34a73bfb9 Added full deferred rendering in addition to light pre-pass.
Added missing vertex colored light pre-pass material shader permutation.
2011-12-31 14:20:29 +00:00
Lasse Öörni
ccbfe5babc Further documentation fixes. 2011-12-28 15:10:46 +00:00
Lasse Öörni
700b9c6a02 Post-process documentation fix. 2011-12-28 14:38:23 +00:00
Lasse Öörni
408d063cf5 Documentation edits. 2011-12-28 14:36:55 +00:00
Lasse Öörni
7075513957 Cleaned up bloom shader code.
Split SampleOffsets shader parameter to GBufferInvSize and ShadowMapInvSize parameters.
Set Offsets & InvSize parameters for user-defined rendertargets during postprocessing.
Fixed bug on some NVIDIA drivers caused by using tex2Dlod on the hardware depth buffer.
2011-12-28 13:17:21 +00:00
Lasse Öörni
a1c70a3476 Added bloom post-process effect.
Added global shader parameters to PostProcess.
Added possibility to specify texture units by number instead of name in materials and postprocesses.
2011-12-28 01:43:48 +00:00
Lasse Öörni
5aa1a38a98 Added documentation for post-processing. 2011-12-26 23:48:56 +00:00
Lasse Öörni
3a319a2231 Optimized parsing of numbers from strings. 2011-12-24 03:04:35 +00:00
Lasse Öörni
97f1fbd7e1 Added relative scale flag to ParticleEmitter XML description file format.
Fixed ParticleEmitter documentation.
2011-12-20 23:42:47 +00:00
Lasse Öörni
75096fe6f9 Refactored screen-size rendertarget allocation in preparation for postprocessing.
Removed the "size 0,0 follows window size" mechanism from Texture2D.
2011-12-20 22:24:09 +00:00
Lasse Öörni
35c21f06d7 Removed the fallback shadow code, as GPUs that actually need it are also too low-performance to render shadows acceptably. 2011-12-13 22:22:46 +00:00
Lasse Öörni
d892a120e7 Reverted the OpenGL viewport reset logic. 2011-12-10 15:57:48 +00:00
Lasse Öörni
8c14956ebe Documentation update. 2011-12-10 15:35:45 +00:00
Lasse Öörni
f564e2bc83 Documentation update. 2011-12-09 21:19:39 +00:00
Lasse Öörni
b9ffb1fc2d Documentation tweaks. 2011-12-06 22:07:32 +00:00
Lasse Öörni
c4e569879d Restored the optional lit base pass optimization, but with the limitation of no ambient gradient.
Removed unneeded GLSL shader permutations.
2011-12-06 21:36:03 +00:00
Lasse Öörni
31b2a692d5 Fixed multithreading documentation. 2011-12-06 14:57:07 +00:00
Lasse Öörni
8f882f8225 Rewrote the zone ambient color gradient system. Now zones only define one ambient color, but look for neighbor zones' ambient colors when gradient mode is enabled.
Fixed missing script bindings to the zone ambient gradient & camera override flags.
Added a default bounding box size for newly created zones.
Added documentation on zones.
2011-12-06 14:48:53 +00:00
Lasse Öörni
738a159c59 Small documentation tweaks. 2011-12-05 22:41:26 +00:00
Lasse Öörni
23f4ba9710 Added more detailed documentation on light pre-pass rendering. 2011-12-05 22:10:05 +00:00
Lasse Öörni
644c37a099 Mark light masks to G-buffer stencil for light culling.
Fixed OpenGL forward rendering.
Documentation fixes.
2011-12-03 17:51:18 +00:00
Lasse Öörni
f9bfd4948f Shader refactoring.
Removed ambient + lit pass combining for less shader permutations, and to prime the Z-buffer with a lightweight pass in case there is a large amount of overdraw.
Moved ambient light calculation to the ambient pass vertex shader.
Added render mode toggle to the editor settings.
Note: OpenGL rendering is currently broken.
2011-12-03 14:06:35 +00:00
Lasse Öörni
abf00cafa9 Merged pixel shader uniforms.
Script code cleanup.
Added LightTest script.
2011-11-29 23:15:34 +00:00
Lasse Öörni
b1ba025970 Fixed hyperthreading detection again.
Send frame update events in Engine::Update(), not in Timer::BeginFrame().
2011-11-27 13:40:40 +00:00
Lasse Öörni
1fbbf5f2cd Limit the amount of worker threads to half the available CPU cores. 2011-11-26 20:00:29 +00:00
Lasse Öörni
2f0d3caecd Migrated to AngelScript 2.22.0. 2011-11-10 00:05:05 +00:00
Lasse Öörni
8a52455faa Added shadow mask feature, which allows selective shadow casting by different lights.
Documented multithreading.
2011-11-07 20:11:20 +00:00
Lasse Öörni
6e51dffdeb Updated readme.
Allow to switch force SM2 / force fallback modes at runtime.
2011-10-23 18:18:47 +00:00
Lasse Öörni
bdc29caebd Reverted to AngelScript 2.21.1 because of crash with VariantMap.
Find the zone at far clip plane and use it for the background color.
Added zone mask for drawables, allowing to select which zones they can belong to.
When zone moves or changes its bounding box, clear the cached zone from all drawables that were inside.
2011-10-22 18:49:15 +00:00
Lasse Öörni
63f23313d6 Sort also the postalpha pass back to front. 2011-10-18 06:36:07 +00:00
Lasse Öörni
7f7e8b970d Added subgeometry centers to the model format for proper sorting of transparent geometries. 2011-10-17 21:59:47 +00:00
Lasse Öörni
7be9585861 Fixed erroneous use of local axis movement when more than one node selected.
Split the extra (custom) rendering pass into prealpha and postalpha.
2011-10-17 20:59:13 +00:00
Lasse Öörni
a436badf8f More documentation updates. 2011-10-14 18:43:17 +00:00
Lasse Öörni
2e32aace3c Documentation update. 2011-10-14 18:20:32 +00:00
Lasse Öörni
a9c5641371 Return to xGxR encoded normal maps and separate specular maps.
Instead of double buffered VBOs, avoid glMapBuffer & glUnmapBuffer in "discard" mode and use a CPU-side buffer instead.
Reduce UI & DebugRenderer vertex buffer size if grossly too large.
Updated documentation. Suggest AMD's Compressonator utility for normal map processing.
2011-10-07 21:30:02 +00:00
Lasse Öörni
2f74622427 Converted DebugGeometry to use a vertex buffer instead of using immediate rendering.
Removed immediate rendering.
2011-10-05 07:05:33 +00:00
Lasse Öörni
71d2e019e6 Use a vertex buffer for UI rendering instead of several immediate mode draw operations. The vertex buffer is locked and updated once per frame, instead of several smaller locks. 2011-10-04 21:49:22 +00:00
Lasse Öörni
653327dd15 Added E_NETWORKUPDATESENT event.
Added direct script access to the Controls object of Connection, instead of going through setter & getter.
Improved NinjaSnowWar controls responsiveness during low FPS, by checking for action button presses separately, and accumulating button presses for networking.
2011-10-04 16:26:19 +00:00
Lasse Öörni
4e18121be0 Updated documentation. 2011-10-04 06:50:01 +00:00
Lasse Öörni
7f09ddcb14 Simplified shader register mapping code. 2011-10-02 14:12:30 +00:00
Lasse Öörni
7d96303e39 Finalized support for overlapping Direct3D9 shader parameters, or the same shader parameters using different registers in different shaders. 2011-10-02 11:17:45 +00:00
Lasse Öörni
0e84c54306 Added shader parameter register count information in the D3D shader file format.
Added tracking of last assigned shader parameter per hardware register to D3D9Graphics. This allows reusing shader registers for different parameters in different shaders.
Removed the ElapsedTime shader parameter, as wrapping it is problematic depending on the calculations it would be used for.
Removed support for bool & int shader parameters from Graphics, as bool constants are not supported in OpenGL 2.0, and int parameters are not (at least currently) needed, and can lead to worse performance.
2011-10-01 09:28:27 +00:00
Lasse Öörni
589c0ee141 Expanded the lit base pass optimization to cover also the first spot or point light affecting a drawable.
Do not render light to stencil if camera is inside the light volume.
Added optimization for directional light shadow casters that are fully occluded by another shadow caster: do not render the lit pass for them.
Removed the alpha masking hint. Alpha test no longer gives the batch a lower priority.
2011-09-29 22:53:16 +00:00
Lasse Öörni
80a6948b22 Large rendering architecture refactoring.
Optimized shaders to do more work in the vertex shader.
Deferred rendering removed, at least for now.
Switched to RGB normal maps, with specular intensity in the alpha channel. Removed NormalMapTool.
Optimization of light influence on objects by stencil masking.
Split shadowed lights are now rendered in one pass. A virtual shadow depth cube texture is used for point lights.
Refactored shadow map allocation. Allow to use lower resolution shadow maps than quarter size.
Added the Polyhedron math object, used for improved shadow map focusing.
Reversed the convention for the plane intercept parameter.
Math-related code cleanup.
2011-09-26 21:56:31 +00:00
Lasse Öörni
f67165bcf3 Documentation fixes. 2011-09-10 20:06:37 +00:00
Lasse Öörni
fe495f6bcc Added deferred fallback mode, which renders the G-buffer in 2 passes.
Made the OpenGL extensions mandatory to unify expected functionality with Direct3D9 mode.
2011-09-10 19:28:59 +00:00
Lasse Öörni
d6a3f89393 Added low-quality (1-sample) shadow filtering option.
Refactored fallback shaders so that they are compiled as variations into the SM2 directory.
2011-09-09 20:41:56 +00:00
Lasse Öörni
292ebed51f Added initial fallback mode (no MRT, no hardware shadows.) 2011-09-08 23:12:48 +00:00
Lasse Öörni
a89cb22161 Replaced edge filtering with temporal antialiasing with ghosting prevention. 2011-09-01 07:19:32 +00:00
Lasse Öörni
3c0298dcf8 Updated documentation on G-buffer setup. 2011-08-29 20:00:26 +00:00
Lasse Öörni
b6e09d2655 Renamed FinishUpdate() to ApplyAttributes() to be more descriptive, and to not confuse with frame updates. 2011-08-23 06:43:18 +00:00
Lasse Öörni
3f7fffbf49 Some renames. CollisionGroup -> CollisionLayer, Scene::GetNodeByID() -> GetNode(), Ray::Distance() -> HitDistance().
Moved all hit distance tests to Ray.
Tundra scene physics import.
2011-08-22 20:06:27 +00:00
Lasse Öörni
84fb81684b Documentation update. 2011-08-19 10:53:36 +00:00
Lasse Öörni
f1bb8bd2ba Updated to latest kNet.
Editor script fixes.
Fixed loading resources from script.
Fixed crashes when handling events from objects that subsequently get destroyed.
Fixed not being able to load elements of type UIElement from xml layouts.
2011-08-15 20:56:53 +00:00
Lasse Öörni
de67af8825 CoreData / Data reorganization.
Comments cleanup.
Removed the fallback-data mechanism from IndexBuffer and VertexBuffer as unnecessary.
2011-08-13 15:43:52 +00:00
Lasse Öörni
dca6687166 In absence of packet loss, use dynamic send rate increase/decrease based on utilization.
Removed unused UDPMessageConnection code.
2011-08-01 00:03:06 +00:00
Lasse Öörni
b694ad047e Refactored interest management into the NetworkPriority component.
Fixed setter functions referring to the Set class in Doxygen comments.
2011-07-31 17:19:00 +00:00
Lasse Öörni
bd76a14249 Fixed Unix build. Fixed counting of enemies in multiplayer NinjaSnowWar. Disabled snowball CollisionShape replication due to divergent simulation on the client. Removed previousControls from Connection as it is potentially unreliable if multiple controls packets arrive between updates. 2011-07-29 22:57:14 +00:00
Lasse Öörni
abe05c6a53 MinGW is no longer officially supported.
Documentation update.
2011-07-29 15:46:47 +00:00
Lasse Öörni
7f88b9977e Documentation update. 2011-07-29 12:44:45 +00:00
Lasse Öörni
7b254df85d Added simple distance-based interest management for networking. 2011-07-29 12:24:22 +00:00
Lasse Öörni
38fe1554ba Initial multiplayer NinjaSnowWar.
Various networking and script API bugfixes.
Fixed kNet profiling compile errors due to STL -> Container library conversion.
Fixed loading of textures failing in headless mode (just return success without doing anything.)
The E_CLIENTCONNECTED and E_CLIENTDISCONNECTED events now also come from the Connection in question, to allow using GetSender() for convenience, instead of looking up the connection from event data.
Added simple network traffic statistics logging to Connection.
2011-07-29 00:04:52 +00:00
Lasse Öörni
1d3f797643 Removed unnecessary code from Connection. 2011-07-27 23:06:12 +00:00
Lasse Öörni
f70cc35815 Added package file download support to the network protocol.
Added commented out package download test code to TestScene.as.
Increased kNet's UDP send rate upper limit and aggressiveness in increasing the send rate.
Fixed being unable to do sparse seeks in files when writing.
Container library bugfixes.
2011-07-27 22:41:12 +00:00
Lasse Öörni
bad8e776de Added networking documentation. 2011-07-27 08:41:16 +00:00
Lasse Öörni
ee9b6cc0f8 Renamed the script PostLoad() to FinishUpdate().
Optimized the finalization of CollisionShape & Joint attributes: the ODE object is not needlessly recreated.
2011-07-21 23:16:28 +00:00
Lasse Öörni
71603ae52e Initial kNet-based networking implementation.
Renamed SharedPtr::Ptr() to RawPtr() to avoid conflicts with kNet's Ptr macro.
Added chat test program.
2011-07-13 23:32:57 +00:00
Lasse Öörni
5a6c8f6d27 Removed global properties related to the script object's ScriptInstance. The ScriptInstance is available as the global property "self" instead.
Documentation update.
2011-07-05 08:46:45 +00:00
Lasse Öörni
a7a94a7af2 Unified the texture get/set data API between Direct3D9 & OpenGL.
Refactored OpenGL texture data restore on context recreation: now data is explicitly stored then restored, instead of relying on resource reload.
2011-07-04 18:55:46 +00:00
Lasse Öörni
0d29d818ad Moved from SDL to GLFW & PortAudio. 2011-06-24 23:20:09 +00:00
Lasse Öörni
af01853960 Fixed erroneous char input suppression in the example scripts.
If only vsync changes on OpenGL, do not recreate the context.
Documentation update.
2011-06-20 22:17:29 +00:00
Lasse Öörni
d55d29612c Documentation update. 2011-06-19 23:13:11 +00:00
Lasse Öörni
432f57b4b0 Use SDL 1.3 in OpenGL mode.
Removed system fonts directory feature because of being platform-specific.
Added the Anonymous Pro fixed width font.
2011-06-18 18:33:29 +00:00
Lasse Öörni
83bf3d1464 Switched to NVIDIA FXAA II based edge filter. 2011-06-15 13:33:16 +00:00
Lasse Öörni
87f9bbd846 Switched back to a edge filter for deferred antialiasing, as temporal antialiasing causes problems when both the camera and objects move.
Fixed infinite loop in HashMap copy.
2011-06-14 21:10:27 +00:00
Lasse Öörni
9c9643508c Use GL_DEPTH_COMPONENT24 instead of the packed depth stencil for OpenGL deferred rendering depth buffer, because the packed format seems to be slower.
Removed light prepass rendering support, as it has implementation difficulties under OpenGL and is often unsatisfactory in performance and specular lighting quality.
Removed the shader subdirectories.
Added option to specify whether single-channel images are to be interpreted as luminance or alpha, when loading into a texture.
2011-06-12 23:38:54 +00:00
Lasse Öörni
2669231c19 Added OpenGL related documentation. 2011-06-12 15:47:21 +00:00
Lasse Öörni
3ca3f84df9 Refactored shader loading. A binary format is now used instead of XML data.
PixelShader and VertexShader classes replaced with Shader and ShaderProgram.
2011-05-22 21:34:35 +00:00
Lasse Öörni
5f4b56103f Refactored ShaderCompiler to use D3DXCompileShader() instead of invoking fxc.exe. 2011-05-21 21:04:24 +00:00
Lasse Öörni
f60321b20f Use PODVector more extensively.
Moved Color class to Core library.
2011-05-21 12:15:04 +00:00
Lasse Öörni
f3859c1ed7 Added documentation about containers.
Removed unnecessary StringUtils.h includes.
Changed GetStringListIndex() to use an empty string as a terminator, similarly to enum attributes.
2011-05-21 10:01:31 +00:00
Lasse Öörni
62c9aa3d9c Added local node & component ID's in preparation to networking.
Split rendering documentation on several pages.
2011-05-10 21:09:03 +00:00
Lasse Öörni
a71d4d7b0e Added mention of AnimationController to the documentation. 2011-05-08 18:24:16 +00:00
Lasse Öörni
37f696be12 Added rest of the reference documentation. 2011-05-08 17:24:13 +00:00
Lasse Öörni
020232744a Even more documentation. 2011-05-08 12:20:22 +00:00
Lasse Öörni
9a5cbb6016 More documentation.
Tweaked NinjaSnowWar difficulty.
Moved CreateObject from Object to Context.
Made EventHandler & AnimationState RefCounted to simplify memory management.
2011-05-07 22:44:40 +00:00
Lasse Öörni
a7a458b3a9 Script API registration cleanup: asMETHODPR changed to asMETHOD where possible.
Added Remove() to Component & Node & UIElement; before it was script-only.
Renamed FrameUpdate back to FrameInfo.
Documentation update.
2011-05-04 07:05:26 +00:00
Lasse Öörni
2a6c10874c Documentation structure and Getting Started-documentation.
Fixed deletion of object, if no shared pointer to it existed previously, and it sent an event.
Fixed threading issue with objects' static type names. Now they are defined inside OBJECTTYPESTATIC macro as well.
Fixed Engine crash when running without the script system.
2011-05-03 23:17:15 +00:00