mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
SDL/OGL platform improvements
This commit is contained in:
parent
213aea8c82
commit
258a6653f9
16 changed files with 711 additions and 1141 deletions
10
IDE/dist/shaders/Std.frag
vendored
Normal file
10
IDE/dist/shaders/Std.frag
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
uniform sampler2D tex;
|
||||
uniform sampler2D tex2;
|
||||
varying vec4 varying_color;
|
||||
varying vec2 varying_texCoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 texColor = texture2D(tex, varying_texCoord0);
|
||||
gl_FragColor = texColor * varying_color;
|
||||
}
|
12
IDE/dist/shaders/Std_font.frag
vendored
Normal file
12
IDE/dist/shaders/Std_font.frag
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
uniform sampler2D tex;
|
||||
uniform sampler2D tex2;
|
||||
varying vec4 varying_color;
|
||||
varying vec2 varying_texCoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 texColor = texture2D(tex, varying_texCoord0);
|
||||
float gray = varying_color.r * 0.299 + varying_color.g * 0.587 + varying_color.b * 0.114;
|
||||
float a = mix(texColor.a, texColor.r, gray);
|
||||
gl_FragColor = vec4(a, a, a, a) * varying_color;
|
||||
}
|
15
IDE/dist/shaders/Std_font.vert
vendored
Normal file
15
IDE/dist/shaders/Std_font.vert
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
uniform mat4 screenMatrix;
|
||||
|
||||
attribute vec4 position;
|
||||
attribute vec2 texCoord0;
|
||||
attribute vec4 color;
|
||||
|
||||
varying vec4 varying_color;
|
||||
varying vec2 varying_texCoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = screenMatrix * position;
|
||||
varying_color = vec4(color.b * color.a, color.g * color.a, color.r * color.a, color.a);
|
||||
varying_texCoord0 = texCoord0;
|
||||
}
|
14
IDE/dist/shaders/Std_font_es.frag
vendored
Normal file
14
IDE/dist/shaders/Std_font_es.frag
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
precision lowp float;
|
||||
|
||||
uniform lowp sampler2D tex;
|
||||
uniform lowp sampler2D tex2;
|
||||
varying lowp vec4 varying_color;
|
||||
varying mediump vec2 varying_texCoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
lowp vec4 texColor = texture2D(tex, varying_texCoord0);
|
||||
float gray = varying_color.r * 0.299 + varying_color.g * 0.587 + varying_color.b * 0.114;
|
||||
float a = mix(texColor.a, texColor.r, gray);
|
||||
gl_FragColor = vec4(a, a, a, a) * varying_color;
|
||||
}
|
17
IDE/dist/shaders/Std_font_es.vert
vendored
Normal file
17
IDE/dist/shaders/Std_font_es.vert
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
precision mediump float;
|
||||
uniform mat4 screenMatrix;
|
||||
|
||||
attribute vec4 position;
|
||||
attribute vec2 texCoord0;
|
||||
attribute vec4 color;
|
||||
|
||||
precision lowp float;
|
||||
varying lowp vec4 varying_color;
|
||||
varying mediump vec2 varying_texCoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = screenMatrix * position;
|
||||
varying_color = vec4(color.b * color.a, color.g * color.a, color.r * color.a, color.a);
|
||||
varying_texCoord0 = texCoord0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue