diff options
author | Dmitry Kostenko <codeforsmile@gmail.com> | 2021-11-04 03:03:10 +0100 |
---|---|---|
committer | x2048 <codeforsmile@gmail.com> | 2022-03-07 23:45:26 +0100 |
commit | 54dccc480eb03adcf219a7add58f547284f40f76 (patch) | |
tree | 53ca69960e1d4bd2facc35368094106b49b56053 /src/client/content_cao.h | |
parent | f2cccf8da72c39299c8e7ba6ad8f782a7d61b883 (diff) | |
download | hax-minetest-server-54dccc480eb03adcf219a7add58f547284f40f76.tar.gz hax-minetest-server-54dccc480eb03adcf219a7add58f547284f40f76.zip |
Improve lighting of entities.
Pass correct natural & artificial light to the shaders
Use natural/artificial light ratio for correct rendering of shadows
Diffstat (limited to '')
-rw-r--r-- | src/client/content_cao.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/content_cao.h b/src/client/content_cao.h index 4bbba9134..70f1557e1 100644 --- a/src/client/content_cao.h +++ b/src/client/content_cao.h @@ -125,7 +125,7 @@ private: std::string m_current_texture_modifier = ""; bool m_visuals_expired = false; float m_step_distance_counter = 0.0f; - u8 m_last_light = 255; + video::SColor m_last_light = video::SColor(0xFFFFFFFF); bool m_is_visible = false; s8 m_glow = 0; // Material @@ -245,7 +245,7 @@ public: void updateLight(u32 day_night_ratio); - void setNodeLight(u8 light); + void setNodeLight(const video::SColor &light); /* Get light position(s). * returns number of positions written into pos[], which must have space |