1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-13 16:44:50 +02:00

add sky shader

This commit is contained in:
XProger
2019-02-02 02:37:16 +03:00
parent bf27452b20
commit 7b41b52db1

30
src/shaders/sky.glsl Normal file
View File

@@ -0,0 +1,30 @@
R"====(
#ifdef GL_ES
precision lowp int;
precision highp float;
#endif
varying vec4 vColor;
varying vec2 vTexCoord;
#ifdef VERTEX
uniform mat4 uViewProj;
attribute vec4 aCoord;
attribute vec4 aColor;
attribute vec4 aTexCoord;
void main() {
vColor = aColor;
vTexCoord = aTexCoord.xy;
gl_Position = uViewProj * vec4(aCoord.xyz * 5.0, 1.0);
gl_Position.z = gl_Position.w;
}
#else
uniform sampler2D sDiffuse;
void main() {
gl_FragColor = texture2D(sDiffuse, vTexCoord) * vColor;
}
#endif
)===="