Skip to content

Conversation

@Andrey2470T
Copy link
Contributor

@Andrey2470T Andrey2470T commented Jun 27, 2024

Fixes #14343 , #14091 and also it is necessary for the colored lighting support in the future.

What this does:

  • Adds a new vertex type video::S3DVertex2Colors with two color attributes.
  • Replaces the current vertex type of the mapblock meshes, wield and inv stacks meshes to that new type. The first color is used as the half-baked color (artificial), the second one is as the hardware one.
  • Adapts all current mesh.cpp functions for working with the meshbuffers of the new type.
  • Adds a direct reading the standard Irrlicht material shaders code from the substrings instead of the files in order to avoid duplicating the most part of the code.
  • Forces the opengl driver to use the shader-based pipeline for the Irrlicht materials to support passing the second color as the GL_TEXTURE1 UV.

To do

This PR is a Work in Progress.

  • Fix the compilation errors of the Irrlicht shaders for COpenGLDriver.
  • Support the shaders-based material rendering for OGLES1/OGLES2.

How to test

Test any own nodes with the paramtype2 color, colorwallmounted, colorfacedir and color4dir with various video drivers enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants