1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +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:
sfan5 2024-12-13 16:11:21 +01:00
parent eb8beb335e
commit a6293b9861
14 changed files with 81 additions and 53 deletions

View file

@ -62,7 +62,7 @@ Sky::Sky(s32 id, RenderingEngine *rendering_engine, ITextureSource *tsrc, IShade
m_materials[0] = baseMaterial();
m_materials[0].MaterialType =
ssrc->getShaderInfo(ssrc->getShader("stars_shader", TILE_MATERIAL_ALPHA)).material;
ssrc->getShaderInfo(ssrc->getShaderRaw("stars_shader", true)).material;
m_materials[1] = baseMaterial();
m_materials[1].MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;