mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Shaders for Android (GLES 2) (#10506)
Shader support for OpenGL ES 2 devices (Android) Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
33b2c5f5b1
commit
707c8c1e95
17 changed files with 233 additions and 120 deletions
|
@ -2,9 +2,12 @@ uniform sampler2D baseTexture;
|
|||
uniform sampler2D normalTexture;
|
||||
uniform vec3 yawVec;
|
||||
|
||||
varying lowp vec4 varColor;
|
||||
varying mediump vec2 varTexCoord;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
vec2 uv = gl_TexCoord[0].st;
|
||||
vec2 uv = varTexCoord.st;
|
||||
|
||||
//texture sampling rate
|
||||
const float step = 1.0 / 256.0;
|
||||
|
@ -27,6 +30,6 @@ void main (void)
|
|||
|
||||
vec3 color = (1.1 * diffuse + 0.05 * height + 0.5 * specular) * base.rgb;
|
||||
vec4 col = vec4(color.rgb, base.a);
|
||||
col *= gl_Color;
|
||||
col *= varColor;
|
||||
gl_FragColor = vec4(col.rgb, base.a);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue