Skip to content

Commit a6ec694

Browse files
authored
Merge pull request #256 from cortex-command-community/mac-fixes
Mac Fixes
2 parents 6da1d35 + d1758e6 commit a6ec694

File tree

13 files changed

+33
-39
lines changed

13 files changed

+33
-39
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*.user
1010
# IDE files
1111
/.idea
12+
# Meson files
13+
*.wraplock
1214

1315
compile_commands.json
1416
**/.ccls-cache

Data/Base.rte/Shaders/Background.frag

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 330
1+
#version 330 core
22
#extension GL_KHR_blend_equation_advanced: enable
33
#extension GL_ARB_sample_shading: enable
44

@@ -16,7 +16,7 @@ uniform bool rteBlendInvert = false;
1616
uniform bool drawMasked = false;
1717

1818

19-
vec4 texture2DAA(sampler2D tex, vec2 uv) {
19+
vec4 textureAA(sampler2D tex, vec2 uv) {
2020
vec2 texsize = vec2(textureSize(tex, 0));
2121
vec2 uv_texspace = uv * texsize;
2222
vec2 seam = floor(uv_texspace + .5);
@@ -26,13 +26,13 @@ vec4 texture2DAA(sampler2D tex, vec2 uv) {
2626
}
2727

2828
void main() {
29-
float red = texture2D(rteTexture, textureUV).r;
29+
float red = texture(rteTexture, textureUV).r;
3030
if (red==0 && drawMasked) {
3131
discard;
3232
}
3333
if (!rteBlendInvert) {
34-
FragColor = texture2DAA(rtePalette, vec2(red * vertexColor.r, 0.0)) * vec4(rteColor.rgb, rteColor.a * vertexColor.a);
34+
FragColor = textureAA(rtePalette, vec2(red * vertexColor.r, 0.0)) * vec4(rteColor.rgb, rteColor.a * vertexColor.a);
3535
} else {
36-
FragColor = vec4(vec3(1.0), 0.0) - (texture2DAA(rtePalette, vec2(red * vertexColor.r, 0.0)) * vec4(rteColor.rgb, -rteColor.a * vertexColor.a));
36+
FragColor = vec4(vec3(1.0), 0.0) - (textureAA(rtePalette, vec2(red * vertexColor.r, 0.0)) * vec4(rteColor.rgb, -rteColor.a * vertexColor.a));
3737
}
3838
}

Data/Base.rte/Shaders/Blit8.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Blit8.frag
2-
#version 130
2+
#version 330 core
33

44
in vec2 textureUV;
55

Data/Base.rte/Shaders/Blit8.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 130
1+
#version 330 core
22

33
in vec3 rteVertexPosition;
44
in vec2 rteVertexTexUV;

Data/Base.rte/Shaders/Dissolve.frag

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 130
1+
#version 330 core
22

33
in vec2 textureUV;
44
in vec4 vertexColor;
@@ -32,7 +32,7 @@ float noise( vec2 U )
3232
return mix( C.x, C.y, U.y );
3333
}
3434

35-
vec4 texture2DAA(sampler2D tex, vec2 uv) {
35+
vec4 textureAA(sampler2D tex, vec2 uv) {
3636
vec2 texsize = vec2(textureSize(tex, 0));
3737
vec2 uv_texspace = uv * texsize;
3838
vec2 seam = floor(uv_texspace + .5);
@@ -45,8 +45,8 @@ void main() {
4545
if (noise(gl_FragCoord.xy + textureUV) < 0.5) {
4646
discard;
4747
}
48-
float red = texture2D(rteTexture, textureUV).r;
49-
vec4 color = texture2DAA(rtePalette, vec2(red * vertexColor.r, 0.0)) * vec4(rteColor.rgb, rteColor.a * vertexColor.a);
48+
float red = texture(rteTexture, textureUV).r;
49+
vec4 color = textureAA(rtePalette, vec2(red * vertexColor.r, 0.0)) * vec4(rteColor.rgb, rteColor.a * vertexColor.a);
5050

5151
FragColor = color;
5252
}

Data/Base.rte/Shaders/Flat.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 130
1+
#version 330 core
22

33
in vec2 textureUV;
44

Data/Base.rte/Shaders/PostProcess.frag

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 130
1+
#version 330 core
22

33
in vec2 textureUV;
44
in vec4 vertexColor;
@@ -9,7 +9,7 @@ uniform sampler2D rteTexture;
99
uniform vec4 rteColor;
1010

1111

12-
vec4 texture2DAA(sampler2D tex, vec2 uv) {
12+
vec4 textureAA(sampler2D tex, vec2 uv) {
1313
vec2 texsize = vec2(textureSize(tex, 0));
1414
vec2 uv_texspace = uv * texsize;
1515
vec2 seam = floor(uv_texspace + .5);
@@ -19,5 +19,5 @@ vec4 texture2DAA(sampler2D tex, vec2 uv) {
1919
}
2020

2121
void main() {
22-
FragColor = texture2DAA(rteTexture, textureUV) * rteColor * vertexColor;
22+
FragColor = textureAA(rteTexture, textureUV) * rteColor * vertexColor;
2323
}

Data/Base.rte/Shaders/PostProcess.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 130
1+
#version 330 core
22

33
in vec3 rteVertexPosition;
44
in vec2 rteVertexTexUV;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 130
1+
#version 330 core
22

33
in vec2 textureUV;
44

@@ -7,7 +7,7 @@ out vec4 FragColor;
77
uniform sampler2D rteTexture;
88
uniform sampler2D rteGUITexture;
99

10-
vec4 texture2DAA(sampler2D tex, vec2 uv) {
10+
vec4 textureAA(sampler2D tex, vec2 uv) {
1111
vec2 texsize = vec2(textureSize(tex, 0));
1212
vec2 uv_texspace = uv * texsize;
1313
vec2 seam = floor(uv_texspace + .5);
@@ -17,8 +17,8 @@ vec4 texture2DAA(sampler2D tex, vec2 uv) {
1717
}
1818

1919
void main() {
20-
vec4 guiColor = texture2DAA(rteGUITexture, vec2(textureUV.x, -textureUV.y));
20+
vec4 guiColor = textureAA(rteGUITexture, vec2(textureUV.x, -textureUV.y));
2121
float guiSolid = float((guiColor.r + guiColor.g + guiColor.b) > 0.0);
2222
float blendRatio = max(guiColor.a, guiSolid);
23-
FragColor = (texture2DAA(rteTexture, textureUV) * (1.0F - blendRatio)) + guiColor * blendRatio;
23+
FragColor = (textureAA(rteTexture, textureUV) * (1.0F - blendRatio)) + guiColor * blendRatio;
2424
}

Data/Base.rte/Shaders/ScreenBlit.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version 130
1+
#version 330 core
22

33
in vec3 rteVertexPosition;
44
in vec2 rteVertexTexUV;

0 commit comments

Comments
 (0)