Commit Graph

41 Commits

Author SHA1 Message Date
Abdou-31 d1b80b462e
Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
x2048 ff6dcfea82
Implement rendering pipeline and post-processing (#12465)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: lhofhansl <lhofhansl@yahoo.com>
2022-09-06 08:25:18 +02:00
DS df1d215f48
Node vertex shader: Properly use the waved world position (#12665) 2022-08-10 18:04:12 +02:00
x2048 dc45b85a54
Improve shadow filters (#12195)
* Rewrite shadow filtering for the new distortion
* Calculate penumbra radius using a single sample
* Avoid peter-panning effect due to filtering of short shadows
* Add adaptive filter quality for soft shadows
* Avoid sharp shadows on surfaces without normals (e.g. plants)
* Increase default and maximum soft shadow radius
* Make line numbers in shader errors match the code
2022-05-21 16:49:30 +02:00
x2048 a5d29fa1d4
Implement shadow offsets for the new SM distortion function (#12191)
* Move shadow position calculation to vertex shaders
* Animate entire scene before rendering shadows to prevent lagging of shadows
* Remove unnecessary use of PolygonOffsetFactor
* Apply normal offset to both nodes and objects
* Rename getPerspectiveFactor -> applyPerspectiveDistortion
* Remove perspective distortion from fragment shaders
2022-04-14 22:49:30 +02:00
ShadowNinja 7993909fab Spacing fixes 2022-04-08 14:55:21 +01:00
x2048 31578303a4
Tune shadow perspective distortion (#12146)
* Pass perspective distortion parameters as uniforms
* Set all perspective bias parameters via ShadowRenderer
* Recalibrate perspective distortion and shadow range to render less shadow geometry with the same quality and observed shadow distance
2022-03-31 22:40:06 +02:00
x2048 0f25fa7af6
Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
2022-03-26 16:58:26 +01:00
Dmitry Kostenko b651bbf446 Reuse normal offset calculation for nodes 2022-03-07 23:45:26 +01:00
Liso c47313db65
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
2021-06-06 18:51:21 +02:00
sfan5 69c70dd319 Fix swapped vertex colors on GLES2 2021-05-11 21:15:39 +02:00
Vitaliy 03540e7140
Fix GLES shader support after #9247 (#10727) 2020-12-22 14:53:52 +01:00
HybridDog e73c5d4585
Fix MSAA stripes (#9247)
This only works when shaders are enabled.
The centroid varying avoids that the textures (which repeat themselves out of bounds) are sampled out of bounds in MSAA.
If MSAA (called FSAA in minetest) is disabled, the centroid keyword does nothing.
2020-12-04 20:16:12 +01:00
Vitaliy 707c8c1e95
Shaders for Android (GLES 2) (#10506)
Shader support for OpenGL ES 2 devices (Android)

Co-authored-by: sfan5 <sfan5@live.de>
2020-10-25 18:01:03 +01:00
Lars ed22260822 Remove all bump mapping and parallax occlusion related code. 2020-10-17 13:09:16 -07:00
SmallJoker c87d52a5fa Shaders: Complete 478e753. OpenGL 4.3 compatiblity 2020-04-18 18:36:47 +02:00
SmallJoker 478e753298 Shaders: Fix OpenGL < 4.3 compatibility 2020-02-16 14:14:34 +01:00
Lars Hofhansl 60bff1e6cb Waves generated with Perlin-type noise #8994 2019-11-19 19:42:52 -08:00
lhofhansl 5fde69798c
Simple shader fixes. (#8991)
1. Pass current camera offset to shader, so shader have access to the global coordinates
2. Pass animation timer to fragment shader. C++ code is already there, just wasn't declared in the shader
3. Delay animation timer wrap-around (from 100s to about 16 minutes)
2019-09-26 13:57:39 -07:00
Paramat 42e1a12714
Require 'waving = 3' in a nodedef to apply the liquid waving shader (#8418)
Makes the liquid waving shader per-nodedef like waving leaves/plants,
instead of being applied to all liquids.
Like the waving leaves/plants shaders, the liquid waving shader can
also be applied to meshes and nodeboxes.

Derived from a PR by t0ny2.
2019-03-27 00:18:43 +00:00
xzcx 1c4c0d4673 Shaders: Fix comment line (#7668)
Fixed comment as finalColorBlend() does not exist in the code base.
2018-08-30 20:32:17 +02:00
Dániel Juhász d04d8aba70 Add hardware node coloring. Includes:
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-23 07:27:12 +01:00
lhofhansl 6bb4347208 Remove unused shader matrices. (#4723) 2016-11-04 18:12:45 +01:00
paramat 597c1d73da Nodes shader: Decrease amplitude of waving leaves and plants
Fix initialisation of variable 'disp'
Fix a few minor code style issues
Add independent X motion combining 2 prime frequencies
2016-03-30 01:53:22 +01:00
est31 205e38f5b8 Replace CRLF with LF in shader files 2016-03-25 15:57:18 +01:00
paramat 0b87556048 Shaders: use triple-frequency waving for leaves and plants 2015-09-07 21:52:36 +02:00
RealBadAngel 8b8d17b22b Remove use of engine sent texture tiling flags - theyre no longer needed 2015-08-20 02:41:40 +02:00
RealBadAngel 655fc6010f Fix relief mapping issues 2015-07-16 15:36:48 +02:00
RealBadAngel 8a85e5e58d Shaders fixes and cleanup relief mapping code. 2015-07-02 21:36:45 +02:00
RealBadAngel 53efe2ef42 Remove textures vertical offset. Fix for area enabling parallax. 2015-06-21 00:11:09 +02:00
est31 ee38bcd307 Automated whitespace error fix for last commit 2015-06-14 23:15:20 +02:00
RealBadAngel 43fcfbfe05 Improved parallax mapping. Generate heightmaps on the fly. 2015-06-14 21:13:36 +02:00
Loic Blot 46821f1156 Optimize bumpmapping mathematics
OpenGL_vertex:
* bufferize a duplicate calcul
* Factorize vertexes
2015-01-16 20:54:04 +10:00
Craig Robbins 516f1bcd16 Revert "Optimize bumpmapping mathematics"
This reverts commit 148fffb0f2.
2015-01-16 01:30:03 +10:00
Loic Blot 148fffb0f2 Optimize bumpmapping mathematics
OpenGL_vertex:
* bufferize a duplicate calcul
* Factorize vertexes
2015-01-15 23:12:45 +10:00
RealBadAngel 535c473103 Restore finalColorBlend implementation in shaders. 2014-12-07 11:05:00 +01:00
RealBadAngel bf91d623c8 Let lighting be done only CPU side. Remove finalColorBlend implementation from shaders. 2014-08-16 14:48:52 +02:00
RealBadAngel 5e54bf1472 Make faces shading correct for all possible modes.
Skip shading for lightsources and top of the nodes.
Fixes liquid sources and flowing surfaces having different brightness.
2014-08-14 06:43:47 +02:00
RealBadAngel c9ba92c4ad Faces shading fixes 2014-07-07 18:06:20 +02:00
RealBadAngel a0f78659f3 Improved faces shading with and without shaders. 2014-06-17 00:56:17 +02:00
RealBadAngel 6c98fd6658 Unite nodes shaders.
Pass drawtype and material type to shaders.
Move shaders generation to startup only.
Allow assign shaders per tile.
Initial code to support water surface shader.
2014-06-15 05:40:33 +02:00