Skip to content

Commit c80a961

Browse files
committed
Fix formatting
1 parent f97379a commit c80a961

383 files changed

Lines changed: 90403 additions & 94344 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Data/Base.rte/Shaders/Blit8.frag

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Blit8.frag
1+
// Blit8.frag
22
#version 330 core
33

44
in vec2 textureUV;
@@ -8,8 +8,7 @@ out vec4 FragColor;
88
uniform sampler2D rteTexture;
99
uniform sampler1D rtePalette;
1010

11-
void main()
12-
{
11+
void main() {
1312
float colorIndex = texture(rteTexture, vec2(textureUV.x, -textureUV.y)).r;
1413
FragColor = texture(rtePalette, colorIndex);
1514
}

Data/Base.rte/Shaders/Blit8.vert

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

3-
layout (location = 0) in vec2 rteVertexPosition;
4-
layout (location = 1) in vec2 rteTexUV;
3+
layout(location = 0) in vec2 rteVertexPosition;
4+
layout(location = 1) in vec2 rteTexUV;
55

66
out vec2 textureUV;
77

@@ -10,6 +10,6 @@ uniform mat4 rteProjection;
1010
uniform mat4 rteUVTransform;
1111

1212
void main() {
13-
gl_Position = rteProjection * rteTransform * vec4(rteVertexPosition, 0.0, 1.0);
14-
textureUV = (rteUVTransform * vec4(rteTexUV, 0.0, 1.0)).xy;
13+
gl_Position = rteProjection * rteTransform * vec4(rteVertexPosition, 0.0, 1.0);
14+
textureUV = (rteUVTransform * vec4(rteTexUV, 0.0, 1.0)).xy;
1515
}

Data/Base.rte/Shaders/PostProcess.frag

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ out vec4 FragColor;
77
uniform sampler2D rteTexture;
88
uniform vec4 rteColor;
99

10-
11-
void main() {
12-
FragColor = texture(rteTexture, textureUV) * rteColor;
10+
void main() {
11+
FragColor = texture(rteTexture, textureUV) * rteColor;
1312
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#version 330 core
22

3-
layout (location = 0) in vec2 rteVertexPosition;
4-
layout (location = 1) in vec2 rteTexUV;
3+
layout(location = 0) in vec2 rteVertexPosition;
4+
layout(location = 1) in vec2 rteTexUV;
55

66
out vec2 textureUV;
77

88
uniform mat4 rteTransform;
99
uniform mat4 rteProjection;
1010

11-
1211
void main() {
13-
gl_Position = rteProjection * rteTransform * vec4(rteVertexPosition, 0.0, 1.0);
14-
textureUV = vec2(rteTexUV.x, -rteTexUV.y);
12+
gl_Position = rteProjection * rteTransform * vec4(rteVertexPosition, 0.0, 1.0);
13+
textureUV = vec2(rteTexUV.x, -rteTexUV.y);
1514
}

Data/Base.rte/Shaders/ScreenBlit.frag

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ uniform sampler2D rteTexture;
88
uniform sampler2D rteGUITexture;
99

1010
vec4 texture2DAA(sampler2D tex, vec2 uv) {
11-
vec2 texsize = vec2(textureSize(tex,0));
12-
vec2 uv_texspace = uv*texsize;
13-
vec2 seam = floor(uv_texspace+.5);
14-
uv_texspace = (uv_texspace-seam)/fwidth(uv_texspace)+seam;
15-
uv_texspace = clamp(uv_texspace, seam-.5, seam+.5);
16-
return texture(tex, uv_texspace/texsize);
11+
vec2 texsize = vec2(textureSize(tex, 0));
12+
vec2 uv_texspace = uv * texsize;
13+
vec2 seam = floor(uv_texspace + .5);
14+
uv_texspace = (uv_texspace - seam) / fwidth(uv_texspace) + seam;
15+
uv_texspace = clamp(uv_texspace, seam - .5, seam + .5);
16+
return texture(tex, uv_texspace / texsize);
1717
}
1818

1919
void main() {
20-
vec4 guiColor = texture2DAA(rteGUITexture, textureUV);
21-
float guiSolid = step(0.00000001, guiColor.r + guiColor.g + guiColor.b);
22-
float blendRatio = max(guiColor.a, guiSolid);
23-
FragColor = (texture2DAA(rteTexture, textureUV) * (1- blendRatio)) + guiColor * blendRatio;
20+
vec4 guiColor = texture2DAA(rteGUITexture, textureUV);
21+
float guiSolid = step(0.00000001, guiColor.r + guiColor.g + guiColor.b);
22+
float blendRatio = max(guiColor.a, guiSolid);
23+
FragColor = (texture2DAA(rteTexture, textureUV) * (1 - blendRatio)) + guiColor * blendRatio;
2424
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#version 330 core
22

3-
layout (location = 0) in vec2 rteVertexPosition;
4-
layout (location = 1) in vec2 rteTexUV;
3+
layout(location = 0) in vec2 rteVertexPosition;
4+
layout(location = 1) in vec2 rteTexUV;
55

66
out vec2 textureUV;
77

88
uniform mat4 rteTransform;
99
uniform mat4 rteProjection;
1010

1111
void main() {
12-
gl_Position = rteProjection * rteTransform * vec4(rteVertexPosition.xy, 0.0, 1.0);
13-
textureUV = rteTexUV;
14-
}
12+
gl_Position = rteProjection * rteTransform * vec4(rteVertexPosition.xy, 0.0, 1.0);
13+
textureUV = rteTexUV;
14+
}

0 commit comments

Comments
 (0)