浏览代码

Fixed GLSL 100 shaders

texture() doesn't exist in glsl 100, it must use texture2D().
pull/128/head
victorfisac 9 年前
父节点
当前提交
77f599885d
共有 4 个文件被更改,包括 4 次插入4 次删除
  1. +1
    -1
      examples/resources/shaders/glsl100/bloom.fs
  2. +1
    -1
      examples/resources/shaders/glsl100/grayscale.fs
  3. +1
    -1
      shaders/glsl100/bloom.fs
  4. +1
    -1
      shaders/glsl100/grayscale.fs

+ 1
- 1
examples/resources/shaders/glsl100/bloom.fs 查看文件

@ -26,7 +26,7 @@ void main()
}
// Texel color fetching from texture sampler
vec4 texelColor = texture(texture0, fragTexCoord);
vec4 texelColor = texture2D(texture0, fragTexCoord);
// Calculate final fragment color
if (texelColor.r < 0.3) tc = sum*sum*0.012 + texelColor;

+ 1
- 1
examples/resources/shaders/glsl100/grayscale.fs 查看文件

@ -15,7 +15,7 @@ uniform vec4 fragTintColor;
void main()
{
// Texel color fetching from texture sampler
vec4 texelColor = texture(texture0, fragTexCoord)*fragTintColor*fragColor;
vec4 texelColor = texture2D(texture0, fragTexCoord)*fragTintColor*fragColor;
// Convert texel color to grayscale using NTSC conversion weights
float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));

+ 1
- 1
shaders/glsl100/bloom.fs 查看文件

@ -26,7 +26,7 @@ void main()
}
// Texel color fetching from texture sampler
vec4 texelColor = texture(texture0, fragTexCoord);
vec4 texelColor = texture2D(texture0, fragTexCoord);
// Calculate final fragment color
if (texelColor.r < 0.3) tc = sum*sum*0.012 + texelColor;

+ 1
- 1
shaders/glsl100/grayscale.fs 查看文件

@ -15,7 +15,7 @@ uniform vec4 colDiffuse;
void main()
{
// Texel color fetching from texture sampler
vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor;
vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor;
// Convert texel color to grayscale using NTSC conversion weights
float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));

正在加载...
取消
保存