diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index b7a44b21..44942632 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -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 diff --git a/samples/GLSL/gbuffers_textured_lit.fsh b/samples/GLSL/gbuffers_textured_lit.fsh new file mode 100644 index 00000000..1183dbcf --- /dev/null +++ b/samples/GLSL/gbuffers_textured_lit.fsh @@ -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; +} \ No newline at end of file diff --git a/samples/GLSL/gbuffers_textured_lit.vsh b/samples/GLSL/gbuffers_textured_lit.vsh new file mode 100644 index 00000000..d874a876 --- /dev/null +++ b/samples/GLSL/gbuffers_textured_lit.vsh @@ -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(); +} \ No newline at end of file