mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Rewrite rendering engine (#6253)
* Clean draw_*() arguments * Split rendering core * Add anaglyph 3D * Interlaced 3D * Drop obsolete methods
This commit is contained in:
parent
65c5539035
commit
28841961ba
25 changed files with 1008 additions and 618 deletions
21
client/shaders/3d_interlaced_merge/opengl_fragment.glsl
Normal file
21
client/shaders/3d_interlaced_merge/opengl_fragment.glsl
Normal file
|
@ -0,0 +1,21 @@
|
|||
uniform sampler2D baseTexture;
|
||||
uniform sampler2D normalTexture;
|
||||
uniform sampler2D textureFlags;
|
||||
|
||||
#define leftImage baseTexture
|
||||
#define rightImage normalTexture
|
||||
#define maskImage textureFlags
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec2 uv = gl_TexCoord[0].st;
|
||||
vec4 left = texture2D(leftImage, uv).rgba;
|
||||
vec4 right = texture2D(rightImage, uv).rgba;
|
||||
vec4 mask = texture2D(maskImage, uv).rgba;
|
||||
vec4 color;
|
||||
if (mask.r > 0.5)
|
||||
color = right;
|
||||
else
|
||||
color = left;
|
||||
gl_FragColor = color;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue