mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Reduce size of SMaterial struct
This commit is contained in:
parent
be75e42d77
commit
2cdf3af1b8
8 changed files with 39 additions and 42 deletions
|
@ -18,7 +18,7 @@ void SetColorMaskStep::run(PipelineContext &context)
|
|||
{
|
||||
video::SOverrideMaterial &mat = context.device->getVideoDriver()->getOverrideMaterial();
|
||||
mat.reset();
|
||||
mat.Material.ColorMask = color_mask;
|
||||
mat.Material.ColorMask = static_cast<video::E_COLOR_PLANE>(color_mask);
|
||||
mat.EnableProps = video::EMP_COLOR_MASK;
|
||||
mat.EnablePasses = scene::ESNRP_SKY_BOX | scene::ESNRP_SOLID |
|
||||
scene::ESNRP_TRANSPARENT | scene::ESNRP_TRANSPARENT_EFFECT;
|
||||
|
|
|
@ -21,7 +21,7 @@ PostProcessingStep::PostProcessingStep(u32 _shader_id, const std::vector<u8> &_t
|
|||
void PostProcessingStep::configureMaterial()
|
||||
{
|
||||
material.UseMipMaps = false;
|
||||
material.ZBuffer = true;
|
||||
material.ZBuffer = video::ECFN_LESSEQUAL;
|
||||
material.ZWriteEnable = video::EZW_ON;
|
||||
for (u32 k = 0; k < texture_map.size(); ++k) {
|
||||
material.TextureLayers[k].AnisotropicFilter = 0;
|
||||
|
|
|
@ -27,7 +27,7 @@ static video::SMaterial baseMaterial()
|
|||
video::SMaterial mat;
|
||||
mat.ZBuffer = video::ECFN_DISABLED;
|
||||
mat.ZWriteEnable = video::EZW_OFF;
|
||||
mat.AntiAliasing = 0;
|
||||
mat.AntiAliasing = video::EAAM_OFF;
|
||||
mat.TextureLayers[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
|
||||
mat.TextureLayers[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
|
||||
mat.BackfaceCulling = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue