mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02: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:
@@ -38,7 +38,7 @@ Clouds::Clouds(scene::ISceneManager* mgr, IShaderSource *ssrc,
|
||||
m_material.FogEnable = true;
|
||||
m_material.AntiAliasing = video::EAAM_SIMPLE;
|
||||
{
|
||||
auto sid = ssrc->getShader("cloud_shader", TILE_MATERIAL_ALPHA);
|
||||
auto sid = ssrc->getShaderRaw("cloud_shader", true);
|
||||
m_material.MaterialType = ssrc->getShaderInfo(sid).material;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user