aboutsummaryrefslogtreecommitdiff
path: root/client/shaders/nodes_shader/opengl_fragment.glsl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve shadow filters (#12195)x20482022-05-211-109/+61
| | | | | | | | | * 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-141-29/+7
| | | | | | | | * 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-081-1/+1
|
* Adjust shadowmap distortion to use entire SM texture (#12166)x20482022-04-071-11/+14
|
* Tune shadow perspective distortion (#12146)x20482022-03-311-9/+9
| | | | | * 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-261-41/+44
| | | * Also Disable shadows when sun/moon is hidden. Fixes #11972.
* Reuse normal offset calculation for nodesDmitry Kostenko2022-03-071-2/+1
|
* Remove debugging codeDmitry Kostenko2022-03-071-2/+0
|
* Fix shadow rendering with filtering disabledDmitry Kostenko2022-03-071-0/+3
|
* Improve self-shadowing based on light/normal angleDmitry Kostenko2022-03-071-2/+6
| | | | Add compatibility with colored shadows.
* Make sure nightRatio is always greater than zero.Dmitry Kostenko2022-01-221-1/+1
| | | | To avoid underfined behavior of GLSL pow()
* Fix shadow mapping when PCF is disabled (#11888)x20482022-01-021-0/+1
|
* Apply shadow only to the naturally lit part of the fragment color (#11722)x20482021-10-311-7/+20
| | | | | | | | | 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-011-2/+7
|
* Fix GLES2 discard behaviour (texture transparency)sfan52021-09-171-3/+6
|
* Distribute shadow map update over multiple frames to reduce stutter (#11422)x20482021-07-251-5/+5
| | | | | | | | | | 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-251-2/+2
| | | | 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-111-6/+10
| | | | | | | | | | | * 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-061-2/+429
| | | Co-authored-by: x2048 <codeforsmile@gmail.com>
* Fix GLES shader support after #9247 (#10727)Vitaliy2020-12-221-1/+5
|
* Cleanup shader generation code (#10663)Vitaliy2020-12-191-2/+2
| | | 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-041-3/+3
| | | | | 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.
* Shaders for Android (GLES 2) (#10506)Vitaliy2020-10-251-6/+7
| | | | | 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-171-99/+0
|
* Remove "generate normal maps" feature (#10313)hecks2020-09-141-45/+2
| | | | | 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-251-0/+8
| | | Workaround for the missing GL_ALPHA_TEST implementation in Mesa (etnaviv driver).
* Simple shader fixes. (#8991)lhofhansl2019-09-261-0/+9
| | | | | 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)
* Fix fog weirdness (#5146)numberZero2017-01-311-1/+1
|
* Shaders: Remove unnecessary 'if' statementsLars Hofhansl2016-12-241-16/+15
| | | | | | Pull if GENERATE_NORMALMAPS == 1 into the template to avoid evaluating it for each fragment. Remove if (fogDistance != 0.0).
* Fog: Make fraction of visible distance at which fog starts configurableLars Hofhansl2016-12-071-1/+1
| | | | | | Optimise the fetching of global settings 'camera_smoothing', 'cinematic' and 'cinematic_camera_smoothing'. Cache 'cam_smoothing'.
* Fix unexplained shader issue (glsl compiler bug??) (#4757)Rogier-52016-11-171-2/+14
|
* Shaders: Remove special handling for liquids. (#4670)lhofhansl2016-10-261-9/+0
|
* Shaders: Apply tone mapping before fog calculation.Lars Hofhansl2016-10-251-4/+4
|
* Shaders: Harmonize Irrlicht and shader fog calculationsLars Hofhansl2016-10-241-4/+4
|
* Use range-based fog instead of z-plane based.Lars Hofhansl2016-10-131-2/+2
|
* Shaders: fix fog not affecting opaque liquidsRealBadAngel2016-02-231-1/+1
|
* Filmic HDR tone mappingRealBadAngel2016-02-091-6/+42
|
* Speed up and make more accurate relief mappingRealBadAngel2015-12-101-5/+19
| | | | using linear + binary search.
* Remove use of engine sent texture tiling flags - theyre no longer neededRealBadAngel2015-08-201-54/+3
|
* Fix relief mapping issuesRealBadAngel2015-07-161-19/+75
|
* Shaders fixes and cleanup relief mapping code.RealBadAngel2015-07-021-39/+24
|
* Bugfix: variable type mismatchRealBadAngel2015-06-281-1/+1
|
* Remove textures vertical offset. Fix for area enabling parallax.RealBadAngel2015-06-211-4/+4
|
* Improved parallax mapping. Generate heightmaps on the fly.RealBadAngel2015-06-141-39/+95
|
* Optimize bumpmapping mathematicsLoic Blot2015-01-161-1/+6
| | | | | | OpenGL_vertex: * bufferize a duplicate calcul * Factorize vertexes
* Revert "Optimize bumpmapping mathematics"Craig Robbins2015-01-161-6/+1
| | | | This reverts commit 148fffb0f23fa437c67639ff3cc69177fb71d76a.
* Optimize bumpmapping mathematicsLoic Blot2015-01-151-1/+6
| | | | | | OpenGL_vertex: * bufferize a duplicate calcul * Factorize vertexes
* Improved faces shading with and without shaders.RealBadAngel2014-06-171-12/+0
|
* Unite nodes shaders.RealBadAngel2014-06-151-0/+128
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.