mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Initial refactoring on shader usage and generation
`IShaderSource` was designed with the idea that if you want a shader, you must want it for a node. So it depends heavily on being given a tile material and the node drawtype. But this doesn't make sense neither in theory nor in practice. This commit takes a small step towards removing the incorrect abstraction.
This commit is contained in:
parent
eb8beb335e
commit
a6293b9861
14 changed files with 81 additions and 53 deletions
|
@ -599,7 +599,7 @@ void Minimap::drawMinimap(core::rect<s32> rect)
|
|||
material.TextureLayers[1].Texture = data->heightmap_texture;
|
||||
|
||||
if (data->mode.type == MINIMAP_TYPE_SURFACE) {
|
||||
auto sid = m_shdrsrc->getShader("minimap_shader", TILE_MATERIAL_ALPHA);
|
||||
auto sid = m_shdrsrc->getShaderRaw("minimap_shader", true);
|
||||
material.MaterialType = m_shdrsrc->getShaderInfo(sid).material;
|
||||
} else {
|
||||
material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue