* 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
* 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
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.
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)
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.
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
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.