aboutsummaryrefslogtreecommitdiff
path: root/client/shaders
AgeCommit message (Collapse)Author
2023-02-10Fix no color values on bloom texture (#13197)x2048
Align meaning of 'exposure' variable across different stages Put 'exposure' variable behind ENABLE_AUTO_EXPOSURE
2023-01-06Add dynamic exposure correction (#12959)x2048
* Add uniform for frame delta time * Adjust exposure in logarithmic (EV) space * Add network support and LUA API * Add testing mod
2022-11-18Add configurable saturation (#12865)lhofhansl
* Add configurable saturation Co-authored-by: Pevernow <3450354617@qq.com> Co-authored-by: x2048 <codeforsmile@gmail.com> Author: Lars <larsh@apache.org>
2022-11-09Fix typos and en_US/en_GB inconsistency in various files (#12902)Abdou-31
2022-11-03Return correct variable when debugging bloom.x2048
Fixes #12922
2022-11-02Improve bloom effect (#12916)x2048
* Remove the built-in exposure factor of 2.5 * Add physics-based bloom (https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom) * Add luminance scaling for bloom layer to simulate HDR * Add setting to control bloom strength
2022-10-09Fix tone mapping being always enabledsfan5
broke in 579fc93c24b030e33a6255d96e773706f6e99c93
2022-10-04Make bloom shaders compatible with GLES2 (#12834)x2048
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
2022-09-29Bloom (#12791)x2048
Adds configurable light exposure control and bloom effect (light bleeding) with client-side settings.
2022-09-06Implement rendering pipeline and post-processing (#12465)x2048
Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: lhofhansl <lhofhansl@yahoo.com>
2022-08-10Node vertex shader: Properly use the waved world position (#12665)DS
2022-05-21Improve shadow filters (#12195)x2048
* 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-04-14Implement shadow offsets for the new SM distortion function (#12191)x2048
* 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-08Spacing fixesShadowNinja
2022-04-07Adjust shadowmap distortion to use entire SM texture (#12166)x2048
2022-03-31Tune shadow perspective distortion (#12146)x2048
* 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-26Add API to control shadow intensity from the game/mod (#11944)x2048
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
2022-03-07Reuse normal offset calculation for nodesDmitry Kostenko
2022-03-07Correct normal bias for entitiesDmitry Kostenko
Remove use of magic constants. Apply cameraOffset Calculate distance projected on SM plane
2022-03-07Change normal bias for entities to avoid shadow acneDmitry Kostenko
2022-03-07Remove debugging codeDmitry Kostenko
2022-03-07Ensure nightRatio is greater than zero in object shaderDmitry Kostenko
2022-03-07Apply texture matrix when rendering shadowmapDmitry Kostenko
Fixes shadows of animated sprite entities
2022-03-07Fix shadow rendering with filtering disabledDmitry Kostenko
2022-03-07Improve lighting of entities.Dmitry Kostenko
Pass correct natural & artificial light to the shaders Use natural/artificial light ratio for correct rendering of shadows
2022-03-07Improve self-shadowing based on light/normal angleDmitry Kostenko
Add compatibility with colored shadows.
2022-03-07Copy shadow mapping shader from nodes to objectsDmitry Kostenko
2022-01-22Make sure nightRatio is always greater than zero.Dmitry Kostenko
To avoid underfined behavior of GLSL pow()
2022-01-02Fix shadow mapping when PCF is disabled (#11888)x2048
2021-10-31Apply shadow only to the naturally lit part of the fragment color (#11722)x2048
Fragment color for nodes is now calculated from: * Texture color, highlighted by artificial light if present (light color conveyed via vertex color). * Texture color highlighted by natural light (conveyed via vertex color) filtered by shadow. * Reflected day/moonlight filtered by shadow (color and intensity), assuming some portion of the light is directly reflected from the materials.
2021-10-01Improvements to colored shadows (#11516)x2048
2021-09-17Fix GLES2 discard behaviour (texture transparency)sfan5
2021-07-25Distribute shadow map update over multiple frames to reduce stutter (#11422)x2048
Reduces stutter and freezes when playing. * Maintains double SM and SM Color textures * Light frustum update triggers incremental generation of shadow map into secondary 'future' textures. * Every incremental update renders a portion of the shadow draw list (split equally). * After defined number of frames (currently, 4), 'future' and 'current' textures are swapped, and DirectionalLight 'commits' the new frustum to use when rendering shadows on screen. Co-authored-by: sfan5 <sfan5@live.de>
2021-07-25Add smooth light-shadow transition at noon (#11430)x2048
Node faces with normals pointing East/West (+X/-X) will transition between light and shadow at noon. This code makes the transition smooth.
2021-07-11Improve shadow rendering with non-default camera FOV (#11385)x2048
* Adjust minimum filter radius for perspective * Expand shadow frustum when camera FOV changes, reuse FOV distance adjustment from numeric.cpp * Read shadow_soft_radius setting as float * Use adaptive filter radius to accomodate for PSM distortion * Adjust filter radius for texture resolution
2021-06-06Shadow mapping render pass (#11244)Liso
Co-authored-by: x2048 <codeforsmile@gmail.com>
2021-05-11Fix swapped vertex colors on GLES2sfan5
2021-03-01Use vec4 for varTexCoord in interlaced shader (#11004)Muhammad Rifqi Priyo Susanto
Somewhen in the past, inTexCoord0 was a vec2. Now, it is a vec4.
2020-12-22Fix GLES shader support after #9247 (#10727)Vitaliy
2020-12-19Cleanup shader generation code (#10663)Vitaliy
Shader generation is a mess. This commit cleans some parts up, including dropping remains of HLSL support which was never actually implemented.
2020-12-04Fix MSAA stripes (#9247)HybridDog
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-11-26Sky: support GLES2numzero
IrrLicht built-in shader is broken, have to write my own
2020-10-25Shaders for Android (GLES 2) (#10506)Vitaliy
Shader support for OpenGL ES 2 devices (Android) Co-authored-by: sfan5 <sfan5@live.de>
2020-10-17Remove all bump mapping and parallax occlusion related code.Lars
2020-09-14Remove "generate normal maps" feature (#10313)hecks
Erase all traces of normal "generation" from fragment shaders Remove the "feature" from the engine and default config Remove any leftover documentation of it
2020-08-25shaders: Fix transparency on GC7000L (#10036)mntmn
Workaround for the missing GL_ALPHA_TEST implementation in Mesa (etnaviv driver).
2020-06-16Make shading of CAOs optional (#10033)Danila Shutov
2020-06-09Fix broken coloring of wielditems (#9969)Danila Shutov
Fixes a regression that appeared in 5.3.0-dev.
2020-04-19Reuse object_shader for "wielditem" and "item" entity drawtypes (#9537)Danila Shutov
2020-04-18Shaders: Complete 478e753. OpenGL 4.3 compatiblitySmallJoker