mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Handle day-night transition in shader and make light sources brighter when shaders are used
This commit is contained in:
parent
566f7f638a
commit
cd1f604ffe
7 changed files with 132 additions and 50 deletions
|
@ -160,9 +160,10 @@ struct MeshCollector
|
|||
// alpha in the A channel of the returned SColor
|
||||
// day light (0-255) in the R channel of the returned SColor
|
||||
// night light (0-255) in the G channel of the returned SColor
|
||||
inline video::SColor MapBlock_LightColor(u8 alpha, u16 light)
|
||||
// light source (0-255) in the B channel of the returned SColor
|
||||
inline video::SColor MapBlock_LightColor(u8 alpha, u16 light, u8 light_source=0)
|
||||
{
|
||||
return video::SColor(alpha, (light & 0xff), (light >> 8), 0);
|
||||
return video::SColor(alpha, (light & 0xff), (light >> 8), light_source);
|
||||
}
|
||||
|
||||
// Compute light at node
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue