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:
30
src/shaders/sky.glsl
Normal file
30
src/shaders/sky.glsl
Normal 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
|
||||
)===="
|
Reference in New Issue
Block a user