소스 검색

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

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

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

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

#version 130

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

uniform sampler2D u_Texture;

out vec4 out_Color;

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

불러오는 중...
취소
저장