1
1
forked from 0ad/0ad
Commit Graph

720 Commits

Author SHA1 Message Date
ab5616b4c4 Mass rename CxPrivate to CmptPrivate.
As part of the SM45->52 migration, a ScriptInterface becomes a wrapper
around a JSCompartment, not a JSContext, thus we ought to store private
data for the compartment and not the context.
This is a mass rename of CxPrivate to CmptPrivate to match that before
the actual changes.

Part of the SM52 migration, stage: SM45 compatible

Patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3089
This was SVN commit r24177.
2020-11-13 16:44:15 +00:00
9669b5f1a9 Removes additional depth texture copying and reusing existing refraction depth.
Tested By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3084
This was SVN commit r24160.
2020-11-11 18:46:52 +00:00
e038f7844b Fixes terrain overlays by removing fixed pipeline dependency.
Tested By: Freagarach, wraitii
Differential Revision: https://code.wildfiregames.com/D3074
This was SVN commit r24154.
2020-11-09 18:50:40 +00:00
61c6da91e8 Moves foam calculation into a separate function and fixes its lighting.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3071
This was SVN commit r24145.
2020-11-08 22:17:58 +00:00
8c77c4b2b6 Refactors coordinates of SOverlayTexturedLine, replaces array of floats by array of CVector2D.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3072
This was SVN commit r24144.
2020-11-08 14:47:25 +00:00
4b52e87934 Adds wireframe mode to overlays and replace the private m_TerrainRenderMode usages by related getter.
This was SVN commit r24143.
2020-11-08 11:31:32 +00:00
b7cbfecd19 Replacing losMap usages by existed and more consistent losTex.
losMap was introduces in fe21c5e023.

This was SVN commit r24130.
2020-11-04 22:55:34 +00:00
ad965e167d Moves simple water from fixed pipeline to shader pipelines (ARB/GLSL).
Commented By: Stan
Reported By: Freagarach
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3059
This was SVN commit r24129.
2020-11-04 22:25:08 +00:00
2d54653bc3 Little cleanup of PatchRData by reordering includes and correctly formats some loops.
This was SVN commit r24126.
2020-11-04 15:53:33 +00:00
c64f8824d7 Fixes wireframe mode for terrain, continuing remove fixed pipeline dependencies.
Commented By: Stan, wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3056
This was SVN commit r24125.
2020-11-04 15:52:26 +00:00
d7d02a4740 Moves terrain lighting calculation to GPU.
Reviewed By: wraitii
Tested By: OptimusShepard, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3052
This was SVN commit r24124.
2020-11-04 12:54:17 +00:00
6e3db3d84c Removes remaining fixed program used in shader pipelines and adds check on FFP create.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D3048
This was SVN commit r24121.
2020-11-03 18:59:27 +00:00
Angen
dcdc17b2dd Do not use GPUSkinning without glsl [Crash fix]
Disable GPUSkinning when glsl is disabled, because VertexAttribPointer
is not implemented on ARB/GLES and it is called by GPUSkinning.

Differential Revision: D2423
Reviewed by: vladislavbelov
Fixes: #5635

This was SVN commit r24101.
2020-10-13 16:48:04 +00:00
ff9a5fe8f9 Render waves for fancy water effects only if we have water on screen.
Waves were added in 9ce51f4357.

This was SVN commit r24047.
2020-09-16 18:43:58 +00:00
92cbf5ead0 Reduces memory usage for fancy water by merging two textures.
Two textures were added in 9ce51f4357.

Reviewed By: wraitii
Tested By: Angen, Freagarach
Differential Revision: https://code.wildfiregames.com/D2983
This was SVN commit r24046.
2020-09-16 18:03:51 +00:00
4f39e6675a Completely separates fixed and shader paths in sky rendering.
Removes usages of fixed pipeline functions in shader path.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2944
This was SVN commit r23954.
2020-08-09 15:21:06 +00:00
b664a1ae8e Moves GL calls of fixed pipeline under the same condition.
This was SVN commit r23953.
2020-08-09 13:01:58 +00:00
4c1847d3db Removes old matrices from sky rendering in shader path.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2943
This was SVN commit r23952.
2020-08-09 11:24:09 +00:00
26ae55cad0 Adds contrast-adaptiv-sharpening filter, also helps to partly remove FXAA texture blurring.
Patch By: OptimusShepard
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2642
This was SVN commit r23947.
2020-08-07 22:16:55 +00:00
f27e5ce139 Fix ODR violation for ShaderModelRendererInternals.
ShaderModelRendererInternals is defined twice, once by ModelRenderer.cpp
and once by HWLightingModelRenderer.cpp.
Having two different definitions in the global namespace is a violation
of the C++ One-Definition-Rule.

Patch by: StefanBruens
Reviewed By: wraitii, Vladislav
Differential Revision: https://code.wildfiregames.com/D2932
This was SVN commit r23941.
2020-08-06 11:33:26 +00:00
57bbd774f6 Makes FXAA working only for GLSL and disabled for ARB.
Also adds option dependency. FXAA was introduced in 113b1c49b9.

Patch By: OptimusShepard
Differential Revision: https://code.wildfiregames.com/D2780
This was SVN commit r23880.
2020-07-24 18:48:18 +00:00
6f70a901f8 Remove duplicated call in tile rendering for TerrainOverlay.
Patch By: vinhig
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2811
This was SVN commit r23767.
2020-06-12 20:52:18 +00:00
fd8a47f5d9 Moves calculations of bounds for fixed shadows to a separate function.
Reduces complexity of the SetupFrame function. Fixed shadows were added
in 8e48e1b17e.

This was SVN commit r23766.
2020-06-12 20:09:08 +00:00
06bf3a8739 Adds GLSL shaders of overlay lines.
We were using ARB shaders in GLSL mode for overlay lines (unit
selection, ranges and so on).

Tested By: Freagarach, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2621
This was SVN commit r23765.
2020-06-12 15:39:44 +00:00
e9361705ae Refactor HWDetect and rendering options setup.
Remove duplication when setting graphic options by reading the configDB
directly.
Properly protect the ModIO config keys.

Approved By: linkmauve
Refs #5538

Differential Revision: https://code.wildfiregames.com/D1931
This was SVN commit r23747.
2020-06-07 13:16:57 +00:00
2e6aecb210 Fixes FXAA for maps with default effects, FXAA was introduced in 113b1c49b9.
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2712
This was SVN commit r23617.
2020-05-02 22:34:29 +00:00
113b1c49b9 Adds anti-aliasing option with FXAA algorithm.
Differential Revision: https://code.wildfiregames.com/D2537
This was SVN commit r23484.
2020-02-05 21:53:10 +00:00
00989a6560 Uses fixed-function pipeline functions only in FFP mode.
Differential Revision: https://code.wildfiregames.com/D2619
This was SVN commit r23481.
2020-02-05 14:00:52 +00:00
36883f2832 Renames RenderTerrain to RenderTerrainFixed to follow its implementation.
RenderTerrainShader was added in d295dacb9b.

This was SVN commit r23479.
2020-02-04 23:16:30 +00:00
b42ebe99f5 Fixes commented block introduced in ecc7d2913e.
Noticed By: Stan
This was SVN commit r23463.
2020-01-29 23:44:14 +00:00
ecc7d2913e Moves GL error check after SwapBuffers to decrease a possible synchronization during rendering process.
Comments By: Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2600
This was SVN commit r23462.
2020-01-29 22:03:44 +00:00
95b13cda13 Adds const to Material and CShaderProgram::Binding methods, removes a redundant variable from ModelRenderer
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2598
This was SVN commit r23445.
2020-01-26 21:32:12 +00:00
1750b0b34c Fixes GLES mode builds on Mesa and running on Intel Iris drivers.
Patch By: linkmauve
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2448
This was SVN commit r23410.
2020-01-17 21:13:51 +00:00
49415f8716 Splits debug display of frustums for an easier debugging of a culling and shadows
This was SVN commit r23395.
2020-01-14 23:51:29 +00:00
b6300eb417 Reorder rendering passes to decrease a possible driver synchronization
Hack inside the ShadowMap was added in b889826a3d and became outdated in
1866c2d3b7.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2541
This was SVN commit r23370.
2020-01-11 15:25:05 +00:00
8e48e1b17e Adds optional fixed shadows without swimming effect
Fixed shadows have fixed rendering distance. Also they don't have a
swimming (blinking) effect on camera movement/rotation.

Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2465
This was SVN commit r23333.
2020-01-05 22:44:39 +00:00
e1cf1e16b9 Unbind the correct texture slot in SkyManager
Wrong binding pair was introduced in 779a33ee30.

Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2487
This was SVN commit r23263.
2019-12-19 21:41:01 +00:00
b5bac2a2a2 Fixes overlay renderer on fixed render path, it was introduced in 14bfbbf9d4.
This was SVN commit r23247.
2019-12-16 18:45:03 +00:00
2fa18b1503 Replaces direct Camera member usage by appropriate method call (m_Orientation > GetOrientation()).
This was SVN commit r23234.
2019-12-14 12:56:47 +00:00
df329d1b81 Optimise out of frustum rendering of texture overlays.
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1847
This was SVN commit r23229.
2019-12-10 23:13:37 +00:00
6110d108c1 Removes hard-coded clip planes from water shader.
Differential Revision: https://code.wildfiregames.com/D2443
This was SVN commit r23228.
2019-12-10 21:39:09 +00:00
Angen
f4562b87b6 Remove duplication of code from WaterManager
Use already defined function ReloadWaterNormalTextures with the same
code.
Fixes the TODO from 2d7d5b446d / aab15123f1

Differential Revision: https://code.wildfiregames.com/D2413
Reviewed By: @vladislavbelov
This was SVN commit r23219.
2019-12-07 15:32:47 +00:00
5d2c20beb0 Replace boost::unordered_map, boost::unordered_set with std::unordered_map, std::unordered_set to establish consistency.
Replace boost::hash_combine with a lib/hash.h hash_combine performing
the same statement.
Replace inconspicuous global boost hash_value specializations with
std::hash specializations.
No performance difference was observed in three simple MeshManager
measurements.

Remove unused TAG_MASK and h_tag in h_mgr.cpp following 0748c5a75e.
Replace typedef with using keyword and sort header includes.

Differential Revision: https://code.wildfiregames.com/D2441
Tested on: clang  9.0.0, gcc 9.2.0, Jenkins/vs2015, Jenkins/gcc6

This was SVN commit r23191.
2019-11-25 14:30:25 +00:00
75d9c6293b Adds projection type to CCamera to control usages of projection dependent properties.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2351
This was SVN commit r23036.
2019-10-03 18:51:40 +00:00
a19b14aeb7 Cleanup Camera related code and uses constant references where possible.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2350
This was SVN commit r23033.
2019-10-03 12:58:47 +00:00
987b36d53c Do not send Reflection and Refraction matrices to shader when not needed
Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1954
This was SVN commit r22971.
2019-09-22 14:56:22 +00:00
8f7729bfdb Fixes values of clip planes in PostProcManager.
Reviewed By: wraitii
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2196
This was SVN commit r22940.
2019-09-20 07:54:44 +00:00
f1de8eb4ba Removes usages of duplication of Clamp function in gui, ps and renderer. Refs D1763.
This was SVN commit r22926.
2019-09-18 14:44:31 +00:00
b1de59de66 Fix algorithmic error in 9903fd8a6c (waves computation speedup), and delete unused code.
9903fd8a6c introduced a much faster (for a little precision cost)
algorithm to compute distance to shore. However a condition was
incorrectly inverted, which made the algorithm return less-than-sensible
results in many situations.

Further, there was some unused code left behind which is now removed.

Fixes #5580

Reported by: nani (shore bug), elexis (unused code)
Differential Revision: https://code.wildfiregames.com/D2249
This was SVN commit r22862.
2019-09-07 08:50:55 +00:00
4919a6185e Remove unused GUIUtil functions, unused GUI includes and some tails in GUIUtil.
HasSetting from 3dfa23cd25 is actually redundant with
IGUIObject::SettingExists.
GetSettingPointer from 8f4f8e240f is superseded by GetSetting reference
following 3dfa23cd25 and 040624acff.
Deregister copying SetSetting variants for CStr and CStrW following copy
removal in 040624acff.
The default template <typename T=int> from c2a71e41bf can be removed
following FallBackSprite/FallBackColor removal in 9985fcf5bd and
RecurseObject unification in d4d5187c9d.
Delete all unused GUI includes, refs D1478.
Remove GUIUtil friend class following something.

Differential Revision: https://code.wildfiregames.com/D2225
Tested on: gcc 9.1.0, Jenkins

This was SVN commit r22779.
2019-08-25 08:57:36 +00:00