浏览代码

neercs: remove deprecated GLSL constructs in text shader.

master
Sam Hocevar 12 年前
父节点
当前提交
a6f357679a
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. +11
    -9
      neercs/video/text.lolfx

+ 11
- 9
neercs/video/text.lolfx 查看文件

@@ -5,14 +5,14 @@
#define HAVE_UINT 1 #define HAVE_UINT 1


#if HAVE_UINT #if HAVE_UINT
attribute uint in_Char, in_Attr; in uint in_Char, in_Attr;
#else #else
attribute vec4 in_Char, in_Attr; in vec4 in_Char, in_Attr;
#endif #endif


varying vec4 pass_Foreground; out vec4 pass_Foreground;
varying vec4 pass_Background; out vec4 pass_Background;
varying vec2 pass_UV; out vec2 pass_UV;


uniform vec2 u_DataSize; uniform vec2 u_DataSize;
uniform mat4 u_Transform; uniform mat4 u_Transform;
@@ -67,15 +67,17 @@ void main()


#version 130 #version 130


varying vec4 pass_Foreground; in vec4 pass_Foreground;
varying vec4 pass_Background; in vec4 pass_Background;
varying vec2 pass_UV; in vec2 pass_UV;


uniform sampler2D u_Texture; uniform sampler2D u_Texture;


out vec4 out_Color;

void main(void) void main(void)
{ {
vec2 c = gl_PointCoord * (1.0 / 32.0) + pass_UV; vec2 c = gl_PointCoord * (1.0 / 32.0) + pass_UV;
float t = texture2D(u_Texture, c).x; float t = texture2D(u_Texture, c).x;
gl_FragColor = mix(pass_Background, pass_Foreground, t); out_Color = mix(pass_Background, pass_Foreground, t);
} }

||||||
x
 
000:0
正在加载...
取消
保存