1
0
forked from 0ad/0ad
Commit Graph

750 Commits

Author SHA1 Message Date
b3cbee6ba9 Performance improvements to VertexBuffer.
Patch By: dm
Tested By: OptimusShepard, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D2528
This was SVN commit r24834.
2021-02-04 23:26:37 +00:00
a564892fab Removes redundant normalizations for float types.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3517
This was SVN commit r24833.
2021-02-04 20:03:03 +00:00
f8fde587a0 Removes unused dummy shader from decals rendering.
This was SVN commit r24828.
2021-02-04 00:00:55 +00:00
30fc281a4c Significantly reduces number of OpenGL state changes for terrain rendering.
Tested By: Freagarach, Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D3512
This was SVN commit r24826.
2021-02-03 17:01:38 +00:00
55f6eae7c5 Removes unused dummy shader from terrain rendering.
This was SVN commit r24822.
2021-02-02 15:34:52 +00:00
065b03a3db Removes useless transparent pass before the water for lowest settings since the water is opaque there.
This was SVN commit r24756.
2021-01-21 22:38:11 +00:00
9df127f9d1 Removes shader code duplication to calculate LOS.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3428
This was SVN commit r24732.
2021-01-20 18:46:32 +00:00
5cbf8f04ec Removes code duplications for binding shadows to shaders.
This was SVN commit r24710.
2021-01-19 19:19:04 +00:00
4c4da81cc4 Fix no pch build.
This was SVN commit r24664.
2021-01-17 15:40:10 +00:00
57389cb9cb Partly restores the requested functionality to hide skies removed in 78d4dd0109.
This was SVN commit r24662.
2021-01-17 13:28:37 +00:00
1cb4ee1634 Combines terrain and units ambient colors into the single color.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3237
This was SVN commit r24661.
2021-01-17 13:10:00 +00:00
4a69e9117e Removes usages of GetRenderPath to checking for support of shaders.
This was SVN commit r24652.
2021-01-16 23:18:56 +00:00
78d4dd0109 Removes useless option to show sky
Differential Revision: https://code.wildfiregames.com/D3382
This was SVN commit r24651.
2021-01-16 21:16:31 +00:00
6282960991 Removes useless option for shadows on water
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3368
This was SVN commit r24630.
2021-01-15 15:45:39 +00:00
a9c27b412b Removes CPU lighting after no FFP
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D3346
This was SVN commit r24599.
2021-01-13 21:03:55 +00:00
e5cbd3decd Removes unused GL texture properties after removed FFP.
This was SVN commit r24577.
2021-01-12 23:18:29 +00:00
f1a3b446f7 Removes the unused terrain rendering function after removed FFP.
This was SVN commit r24576.
2021-01-12 23:14:08 +00:00
8ae3c09dc0 Fix renderer crash in GCC 7.5.
The 'arena' allocator does not take memory alignment into account, which
can result in crashes at -O3 with gcc 7.5 (presumably because of SSE
instructions).

This accounts for alignment issues, fixing the issue.
Also do various cleanup in lib/allocators.

Reported by: Bellaz89, Freagarach
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3181
This was SVN commit r24517.
2021-01-06 14:56:17 +00:00
d28d17e96c Remove SSE detection duplication in Colors and ModelRenderer
- Rename macros to be more explicit
 - Move detection code to a separate file
 - Remove a lot of checks in ARB mode (ModelDef.cpp would check for sse
multiple times per frame)
 - Make explicit the SSE2 dependency for Windows

Comments by: @vladislavbelov @wraitii @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3212
This was SVN commit r24489.
2020-12-31 15:37:28 +00:00
4942cabab5 Fix most Clang 10 Warnings
Refs: #5550, #5294

Remove dead code from f71be3c764
Fix buggy code from ff50b0b74c
Comments by: @wraitii, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3177
This was SVN commit r24487.
2020-12-31 14:25:37 +00:00
dd0b56c8aa Replace DISCARD macro with ignore_result template.
Fixes eb7940b418.
As reported by Vladislav, there is possibly confusion on what exactly is
being ignored when there are multiple statements after DISCARD. Explicit
wrapping avoids that.

Differential Revision: https://code.wildfiregames.com/D3206
This was SVN commit r24397.
2020-12-15 09:03:44 +00:00
369c2e8801 Further header & precompiled cleanup, fix no-PCH builds.
GUIObjectBase is made a IGUIObject* to avoid including those headers
un-necessarily. Subsequent diffs ought to clean up the various of
pointers for that with a similar type with reference semantics.

Also:
- Add standard C and C++ headers (mostly cstring for memcpy, string and
vector) where needed.
- Swap out some includes for forward declarations
- Clean up un-necessary boost includes in precompiled and other headers.
- Clean up precompiled headers, including fewer things.
- Move ACPI to the windows-specific folder as it's included there only
and mostly specific to that platform.

Thanks Stan for the testing.

Differential Revision: https://code.wildfiregames.com/D3129
This was SVN commit r24352.
2020-12-09 14:39:14 +00:00
f44390f3fc Fix 3391542fec: AA / Sharpness not being correctly enabled at the start.
Reported by: OptimusShepard
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D3138
This was SVN commit r24318.
2020-12-03 12:19:44 +00:00
d2075bed5d Fix graphics issue with old AMD cards.
Reviewed by: @vladislavbelov
https://upload.jabberfr.org/hUkR3nTdfhbhHI92/0b5c64c3-136c-4744-a4ca-a70222a3cfaf.png

This was SVN commit r24292.
2020-11-29 16:26:28 +00:00
9ae084519f Fix most of the new vs2017 induced warnings.
Refs: https://code.wildfiregames.com/D3096
https://code.wildfiregames.com/D3103 #5862
Reviewed by: @wraitii
Comments by: @Angen
Differential Revision: https://code.wildfiregames.com/D3126
This was SVN commit r24268.
2020-11-26 22:28:50 +00:00
eb7940b418 Silence warnings about unused result.
Introduce a DISCARD macro to ignore the warn_unused_result attribute
used by Spidermonkey, and reuse it elsewhere.

Differential Revision: https://code.wildfiregames.com/D3147
This was SVN commit r24261.
2020-11-26 13:58:59 +00:00
3391542fec Fix rendering options failures following 8a1b3d6769
Two issues are fixed:
- Atlas on non-Mac crashed when started from within the game.
- MSAA options crashed if enabled on startup.

The underlying issues where improper shutdown, and assuming the renderer
was initialised than it might not be (in particular, the post-processor
wasn't).

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3131
This was SVN commit r24233.
2020-11-22 11:09:13 +00:00
8a1b3d6769 Allow registering hooks that trigger on config changes.
Rendering options use this capability to simplify their implementation.
This makes it easier to add new options.

Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2293
This was SVN commit r24228.
2020-11-21 11:57:14 +00:00
f6348b9617 Clean up header includes, add new forward declarations.
This cleans up many un-necessary header includes, either simply
providing nothing or forward declarations in their place.

No major compilation time change here, though this does reduce depencies
in some headers.

Also fix up old MacOS STL-include fixes that are no longer relevant.

Differential Revision: https://code.wildfiregames.com/D3128
This was SVN commit r24227.
2020-11-21 11:20:29 +00:00
9937116f2b Adds MSAA to anti-aliasing techniques.
Tested By: Freagarach, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2812
This was SVN commit r24188.
2020-11-15 20:07:48 +00:00
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