Vladislav Belov
abf444d91c
Reduces vertex maximum stride to 16
...
https://wikis.khronos.org/opengl/Vertex_Specification_Best_Practices
> The alignment of any attribute's data should be no less than 4 bytes.
But to make it a bit safer for older drivers we prefer to use 16 bytes
alignment (vec4) for now to match std140.
2026-07-12 17:54:26 +02:00
Vladislav Belov
1380a93077
Packs particle size and angle to axes
...
We need to have per-vertex data to be constant to use instancing.
Now we have only UV coordinates.
2026-06-22 23:18:26 +02:00
Vladislav Belov
8c5416e2c5
Adds fragment shader PBR resolve
...
It allows to have PBR for devices without properly detected compute
shaders.
2026-06-20 13:29:01 +02:00
Vladislav Belov
5ca4c93f55
Reduces canvas2d layout for SPIR-V
...
It's preferrable to keep push constant under 64 bytes for some vendors.
The layout optimization rule is similar to C++ one.
2026-06-20 11:22:29 +02:00
Vladislav Belov
59e36be140
Splits shader effects to reuse in material passes
2026-05-10 23:57:23 +02:00
Vladislav Belov
9aee507e28
Adds wireframe techniques for particle and terrain
2026-05-10 23:57:12 +02:00
Vladislav Belov
75bd640bd8
Removes context of terrain shadows and silhouettes
...
We were unnecessary passing all combinations of our scene shader context
even if we don't need it as for shadows and silhouettes for terrain
rendering. Since we only need to draw a solid color.
2026-05-10 23:56:57 +02:00
Vladislav Belov
25df2d8a02
Adds resolve PBR compute shader
...
Also fixes sky shader as it was writing negative values for -Y
direction.
2026-04-29 19:25:12 +02:00
Vladislav Belov
9b79fb3793
Fixes particle solid axes after aae957ec7b
2026-04-25 15:58:25 +02:00
Vladislav Belov
b52fbb7c62
Fixes particle shader compilation
...
The problem was only in case of USE_DESCRIPTOR_INDEXING. Because it adds
additional data for textures to the end of draw uniforms.
Fixes #8780
2026-03-22 00:53:30 +01:00
Vladislav Belov
aae957ec7b
Adds fixed orientation to particles
...
New features:
* Relative position
* Relative and absolute fixed axis
* Local space
* Axis along velocity vector
2026-02-20 22:46:49 +01:00
Vladislav Belov
145e1c116d
Removes ARB shaders
2026-02-20 22:07:39 +01:00
Vladislav Belov
3ffb5ec5a0
Removes USE_FOG define and switches to a shader parameter.
...
Refs #8385
2025-10-11 08:11:35 +02:00
Vladislav Belov
13b988cecb
Removes shader effect duplications.
2025-09-29 12:04:53 +02:00
Ralph Sennhauser
58219b974c
Fix trailing whitespace and add pre-commit hook
...
Some have their editor configured to remove trailing whitespace and
editing such a file would "fix" it, adding an unrelated change.
Fix whitespace violations excluding third party libs and generated files
like glad or patches.
Enable pre-commit hook trailing-whitespace to enforce it in the future.
Fixes : #8016
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-06-15 20:08:48 +02:00
Lancelot de Ferrière
c2bb61fffc
Fix terrain normals to account for angle
2024-12-28 13:25:07 +01:00
Vladislav Belov
6b18e58017
Adds a compute shader to perform a GPU skinning.
...
The main logic is taken from the experimental code in the model_common
shader but rewritten to use storage buffers as inputs.
2024-12-09 22:47:07 +01:00
vladislavbelov
e3f46bb809
Adds compute shaders support and scaling with FSR.
...
Fixes #6842
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D5218
This was SVN commit r28010.
2024-01-17 19:40:27 +00:00
vladislavbelov
debbcba9a6
Reduces code duplication of specular calculation in shaders.
...
Differential Revision: https://code.wildfiregames.com/D5178
This was SVN commit r27924.
2023-11-08 23:07:11 +00:00
vladislavbelov
f2938aaa28
Refactors normal calculation in model and terrain shaders.
...
Differential Revision: https://code.wildfiregames.com/D5081
This was SVN commit r27769.
2023-07-19 17:29:13 +00:00
Stan
7cd980f2e1
Move some engine required files to the mod mod.
...
Most of the shaders are explicitely interned by the engine except for
the one called "Model" which is not required (you can have maps with
just terrain for visualization)
The rng files are called by the engine to validate structure.
The game has two overrides for high quality and normal water to be
"ocean" and "default" respectively
The minimap flare folder is hardcoded see #6795
The default material now calls the dummy shader instead of the model one
when in modmod
Move the default skybox, it will be required by _default.xml
The terrain materials are moved as well, for completeness, although they
are currently not referenced.
This commit does not include atlas needed files as it cannot run without
the public mod anyway for now. It will be done in a separate commit when
we have the ingame editor that will require _default.xml for instance.
This commit is also needed to generate the spir-v shaders in the correct
mods, in order to be able to launch the game with mod mod only.
Refs: #6636 #5366
Fixes : #6294
Differential Revision: https://code.wildfiregames.com/D4906
This was SVN commit r27629.
2023-05-06 17:14:41 +00:00
vladislavbelov
04230f7e03
Adds SPIR-V to effect XML files.
...
Differential Revision: https://code.wildfiregames.com/D4986
This was SVN commit r27624.
2023-04-29 20:36:37 +00:00
vladislavbelov
7c84c23114
Adds Vulkan backend.
...
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4876
This was SVN commit r27412.
2023-01-10 20:22:20 +00:00
vladislavbelov
7c20a8c958
Reduces shader inputs duplication and wraps them in a macro. Refs #6636
...
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4837
This was SVN commit r27282.
2022-12-10 10:14:35 +00:00
vladislavbelov
240c1247ad
Wraps gl_FragColor in a macro to avoid duplication for different versions.
...
gl_FragColor and gl_FragData are deprecated since GLSL 1.30.
This was SVN commit r27204.
2022-11-05 11:49:38 +00:00
vladislavbelov
33dd5d9fbc
Wraps vertex attributes in a macro to avoid duplication for different versions.
...
This was SVN commit r27199.
2022-11-04 23:41:41 +00:00
vladislavbelov
e2f433db8c
Wraps gl_Position in a macro to avoid duplication for different versions.
...
This was SVN commit r27198.
2022-11-04 22:56:56 +00:00
vladislavbelov
dffde00e5f
Reduces uniforms sizes for the Canvas2D shader.
...
Differential Revision: https://code.wildfiregames.com/D4796
This was SVN commit r27136.
2022-10-09 10:44:51 +00:00
vladislavbelov
c5f71d6b87
Fixes grayscaleFactor usage in Canvas2D ARB shader added in 1f192f1593. Fixes #6536
...
Tested By: Langbart
This was SVN commit r26857.
2022-05-07 20:57:16 +00:00
vladislavbelov
eaac0b0dbe
Uses vertex streams to get attribute locations reducing duplication in XML.
...
Also adds missing streams.
This was SVN commit r26792.
2022-04-15 18:13:33 +00:00
vladislavbelov
ad2068dae0
Uses sequential numbering of GL vertex attributes for modern hardware. Refs #3054
...
Differential Revision: https://code.wildfiregames.com/D4601
This was SVN commit r26781.
2022-04-12 16:13:47 +00:00
Angen
a7b7f50cc8
Move some shaders to mod
...
Differential revison: D4547
Fixes : #6294
This was SVN commit r26650.
2022-03-14 17:24:47 +00:00
vladislavbelov
e89e55539e
Removes custom vertex attribute locations for GLSL. Refs ce215cace3.
...
This was SVN commit r26630.
2022-03-12 23:25:23 +00:00
vladislavbelov
a1f98b016b
Moves depth and stencil tests to PipelineState and DeviceCommandContext.
...
Differential Revision: https://code.wildfiregames.com/D4471
This was SVN commit r26286.
2022-02-01 16:38:55 +00:00
vladislavbelov
709e8292b0
Moves color mask, depth mask and function management from CShaderPass to DeviceCommandContext.
...
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4465
This was SVN commit r26284.
2022-01-31 20:10:06 +00:00
vladislavbelov
829e37371b
Moves hardcoded blend state in CCanvas2D to its technique.
...
This was SVN commit r26216.
2022-01-14 17:44:42 +00:00
vladislavbelov
e0b492a83a
Removes old gui_* materials, replaced by a single canvas2d material.
...
This was SVN commit r25714.
2021-06-06 18:25:04 +00:00
vladislavbelov
1f192f1593
Removes low level GL code from GUI sprite rendering and switches to Canvas2D.
...
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4031
This was SVN commit r25603.
2021-05-30 13:48:58 +00:00
vladislavbelov
283f524fcf
Implements DrawRect in Canvas2D, removes CConsole background drawing with low level GL calls.
...
This was SVN commit r25590.
2021-05-29 12:31:14 +00:00
vladislavbelov
b7e6811ea6
Removes fixed shader technique from effects.
...
This was SVN commit r25283.
2021-04-17 22:07:18 +00:00
vladislavbelov
e49cc91257
Adds ARB shaders for GUI materials to replace fixed ones.
...
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2921
This was SVN commit r23945.
2020-08-07 08:32:01 +00:00
wraitii
909b8d4369
Allow multiple special sprites, to facilitate cases where we want to add an overlay to a sprite.
...
"color" can make use of the sprite's alpha texture, and the "add_color"
effect will now take the original image's alpha into account.
Remove the no longer needed "unaffordableMask" images on a variety of
panels.
Somewhat based on a patch by BoeseRaupe. Fixes #2421 and #3688 .
This was SVN commit r17456.
2015-12-13 16:03:17 +00:00
mimo
4cd7dd77c1
add missing files from dd189ffe1f
...
This was SVN commit r15680.
2014-08-26 09:53:29 +00:00
mimo
dd189ffe1f
fix #15678 when preferglsl=true
...
This was SVN commit r15679.
2014-08-26 09:41:14 +00:00
leper
be2f0e69fc
Make the modmod standalone.
...
Mount public in case we are starting Atlas and no mods are specified in
the config.
If users remove all mods and save this to the config and try to start
Atlas it will
crash, as it cannot find some needed files.
This was SVN commit r15678.
2014-08-25 16:38:54 +00:00