mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
IrrlichtMt: Move OpenGL 3+ transformation matrix to shaders (#15591)
This replaces annoying calculations on C++-side and eases the implementation of 2D geometry batch rendering a lot.
This commit is contained in:
parent
412cc96bc9
commit
35bc217ba8
5 changed files with 107 additions and 97 deletions
|
@ -9,6 +9,7 @@ attribute vec2 inTexCoord0;
|
|||
/* Uniforms */
|
||||
|
||||
uniform float uThickness;
|
||||
uniform mat4 uProjection;
|
||||
|
||||
/* Varyings */
|
||||
|
||||
|
@ -17,7 +18,7 @@ varying vec4 vVertexColor;
|
|||
|
||||
void main()
|
||||
{
|
||||
gl_Position = inVertexPosition;
|
||||
gl_Position = uProjection * inVertexPosition;
|
||||
gl_PointSize = uThickness;
|
||||
vTextureCoord = inTexCoord0;
|
||||
vVertexColor = inVertexColor.bgra;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue