Added GLSL extensions .vsh & .fsh (#2951)

This commit is contained in:
Bruce
2016-04-15 08:06:11 -07:00
committed by Arfon Smith
parent 0f3644d23a
commit 9b9a256c60
3 changed files with 33 additions and 0 deletions

View File

@@ -1125,6 +1125,7 @@ GLSL:
- .frag
- .frg
- .fs
- .fsh
- .fshader
- .geo
- .geom
@@ -1133,6 +1134,7 @@ GLSL:
- .shader
- .vert
- .vrx
- .vsh
- .vshader
ace_mode: glsl

View File

@@ -0,0 +1,20 @@
#version 120
uniform sampler2D texture;
varying vec3 color;
varying vec2 texcoord;
vec4 GetDiffuse() {
vec4 diffuse = vec4(color.rgb, 1.0);
diffuse *= texture2D(texture, texcoord);
return diffuse;
}
void main() {
vec4 diffuse = GetDiffuse();
gl_FragData[0] = diffuse;
}

View File

@@ -0,0 +1,11 @@
#version 120
varying vec3 color;
varying vec2 texcoord;
void main() {
color = gl_Color.rgb;
texcoord = gl_MultiTexCoord0.st;
gl_Position = ftransform();
}