summaryrefslogtreecommitdiff
path: root/client/shaders
Commit message (Collapse)AuthorAge
* Improve shadow filters (#12195)x20482022-05-21
| | | | | | | | | * 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
* Implement shadow offsets for the new SM distortion function (#12191)x20482022-04-14
| | | | | | | | * 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
* Spacing fixesShadowNinja2022-04-08
|
* Adjust shadowmap distortion to use entire SM texture (#12166)x20482022-04-07
|
* Tune shadow perspective distortion (#12146)x20482022-03-31
| | | | | * 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
* Add API to control shadow intensity from the game/mod (#11944)x20482022-03-26
| | | * Also Disable shadows when sun/moon is hidden. Fixes #11972.
* Reuse normal offset calculation for nodesDmitry Kostenko2022-03-07
|
* Correct normal bias for entitiesDmitry Kostenko2022-03-07
| | | | | | Remove use of magic constants. Apply cameraOffset Calculate distance projected on SM plane
* Change normal bias for entities to avoid shadow acneDmitry Kostenko2022-03-07
|
* Remove debugging codeDmitry Kostenko2022-03-07
|
* Ensure nightRatio is greater than zero in object shaderDmitry Kostenko2022-03-07
|
* Apply texture matrix when rendering shadowmapDmitry Kostenko2022-03-07
| | | | Fixes shadows of animated sprite entities
* Fix shadow rendering with filtering disabledDmitry Kostenko2022-03-07
|
* Improve lighting of entities.Dmitry Kostenko2022-03-07
| | | | | Pass correct natural & artificial light to the shaders Use natural/artificial light ratio for correct rendering of shadows
* Improve self-shadowing based on light/normal angleDmitry Kostenko2022-03-07
| | | | Add compatibility with colored shadows.
* Copy shadow mapping shader from nodes to objectsDmitry Kostenko2022-03-07
|
* Make sure nightRatio is always greater than zero.Dmitry Kostenko2022-01-22
| | | | To avoid underfined behavior of GLSL pow()
* Fix shadow mapping when PCF is disabled (#11888)x20482022-01-02
|
* Apply shadow only to the naturally lit part of the fragment color (#11722)x20482021-10-31
| | | | | | | | | 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.
* Improvements to colored shadows (#11516)x20482021-10-01
|
* Fix GLES2 discard behaviour (texture transparency)sfan52021-09-17
|
* Distribute shadow map update over multiple frames to reduce stutter (#11422)x20482021-07-25
| | | | | | | | | | 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>
* Add smooth light-shadow transition at noon (#11430)x20482021-07-25
| | | | Node faces with normals pointing East/West (+X/-X) will transition between light and shadow at noon. This code makes the transition smooth.
* Improve shadow rendering with non-default camera FOV (#11385)x20482021-07-11
| | | | | | | | | | | * 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
* Shadow mapping render pass (#11244)Liso2021-06-06
| | | Co-authored-by: x2048 <codeforsmile@gmail.com>
* Fix swapped vertex colors on GLES2sfan52021-05-11
|
* Use vec4 for varTexCoord in interlaced shader (#11004)Muhammad Rifqi Priyo Susanto2021-03-01
| | | Somewhen in the past, inTexCoord0 was a vec2. Now, it is a vec4.
* Fix GLES shader support after #9247 (#10727)Vitaliy2020-12-22
|
* Cleanup shader generation code (#10663)Vitaliy2020-12-19
| | | Shader generation is a mess. This commit cleans some parts up, including dropping remains of HLSL support which was never actually implemented.
* Fix MSAA stripes (#9247)HybridDog2020-12-04
| | | | | 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.
* Sky: support GLES2numzero2020-11-26
| | | | IrrLicht built-in shader is broken, have to write my own
* Shaders for Android (GLES 2) (#10506)Vitaliy2020-10-25
| | | | | Shader support for OpenGL ES 2 devices (Android) Co-authored-by: sfan5 <sfan5@live.de>
* Remove all bump mapping and parallax occlusion related code.Lars2020-10-17
|
* Remove "generate normal maps" feature (#10313)hecks2020-09-14
| | | | | Erase all traces of normal "generation" from fragment shaders Remove the "feature" from the engine and default config Remove any leftover documentation of it
* shaders: Fix transparency on GC7000L (#10036)mntmn2020-08-25
| | | Workaround for the missing GL_ALPHA_TEST implementation in Mesa (etnaviv driver).
* Make shading of CAOs optional (#10033)Danila Shutov2020-06-16
|
* Fix broken coloring of wielditems (#9969)Danila Shutov2020-06-09
| | | Fixes a regression that appeared in 5.3.0-dev.
* Reuse object_shader for "wielditem" and "item" entity drawtypes (#9537)Danila Shutov2020-04-19
|
* Shaders: Complete 478e753. OpenGL 4.3 compatiblitySmallJoker2020-04-18
|
* Add tone mapping for entities (#9521)Danila Shutov2020-04-06
| | | fixes #9301
* Transform texture UVs with provided tex. matrix (#9515)Danila Shutov2020-03-16
| | | fixes #9481
* Basic model shading (#9374)Danila Shutov2020-02-16
|
* Shaders: Fix OpenGL < 4.3 compatibilitySmallJoker2020-02-16
|
* Waves generated with Perlin-type noise #8994Lars Hofhansl2019-11-19
|
* Simple shader fixes. (#8991)lhofhansl2019-09-26
| | | | | 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)
* Require 'waving = 3' in a nodedef to apply the liquid waving shader (#8418)Paramat2019-03-27
| | | | | | | | 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.
* Shaders: Fix comment line (#7668)xzcx2018-08-30
| | | Fixed comment as finalColorBlend() does not exist in the code base.
* Rewrite rendering engine (#6253)Vitaliy2017-10-31
| | | | | | | | | | | | * Clean draw_*() arguments * Split rendering core * Add anaglyph 3D * Interlaced 3D * Drop obsolete methods
* Shaders: Remove unused water surface shaderparamat2017-05-08
| | | | | | | | | | Also remove hardcoded MTGame node. The 'water surface shader' was duplicated shader code in preparation for intended new water surface shaders. For development purposes the MTGame node 'default:water_source' had it's top tile assigned to 'water surface shader'. Due to shader duplication this commit does not cause any change to shader behaviour.
* Fix fog weirdness (#5146)numberZero2017-01-31
|