Res: Improve modeling of AGB/AGS screen in shaders
Vicki Pfau vi@endrift.com
Fri, 04 Jan 2019 21:48:21 -0800
5 files changed,
13 insertions(+),
14 deletions(-)
M
CHANGES
→
CHANGES
@@ -7,7 +7,6 @@ Misc:
- GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash - GB Memory: Support running from blocked memory - - GB Audio: Skip frame if enabled when clock is high 0.7.0: (Future) Features:@@ -160,6 +159,8 @@ - Python: Minor API improvements
- Qt: Minor memory view tweaks - CMake: Fix libswresample version dependencies (fixes mgba.io/i/1229) - Debugger: Readability improvements (fixes mgba.io/i/1238) + - GB Audio: Skip frame if enabled when clock is high + - Res: Improve modeling of AGB/AGS screen in shaders 0.7 beta 1: (2018-09-24) - Initial beta for 0.7
M
res/shaders/agb001.shader/agb001.fs
→
res/shaders/agb001.shader/agb001.fs
@@ -4,18 +4,17 @@ uniform vec2 texSize;
void main() { vec4 color = texture2D(tex, texCoord); - vec3 arrayX[4]; - arrayX[0] = vec3(1.0, 0.2, 0.2); + vec3 arrayX[3]; + arrayX[0] = vec3(0.2, 0.2, 1.0); arrayX[1] = vec3(0.2, 1.0, 0.2); - arrayX[2] = vec3(0.2, 0.2, 1.0); - arrayX[3] = vec3(0.4, 0.4, 0.4); + arrayX[2] = vec3(1.0, 0.2, 0.2); vec3 arrayY[4]; arrayY[0] = vec3(1.0, 1.0, 1.0); arrayY[1] = vec3(1.0, 1.0, 1.0); arrayY[2] = vec3(1.0, 1.0, 1.0); arrayY[3] = vec3(0.8, 0.8, 0.8); color.rgb = pow(color.rgb * vec3(0.8, 0.8, 0.8), vec3(1.8, 1.8, 1.8)) + vec3(0.16, 0.16, 0.16); - color.rgb *= arrayX[int(mod(texCoord.s * texSize.x * 4.0, 4.0))]; + color.rgb *= arrayX[int(mod(texCoord.s * texSize.x * 3.0, 3.0))]; color.rgb *= arrayY[int(mod(texCoord.t * texSize.y * 4.0, 4.0))]; color.a = 0.5; gl_FragColor = color;
M
res/shaders/agb001.shader/manifest.ini
→
res/shaders/agb001.shader/manifest.ini
@@ -7,5 +7,5 @@
[pass.0] fragmentShader=agb001.fs blend=1 -width=-4 +width=-3 height=-4
M
res/shaders/ags001.shader/ags001.fs
→
res/shaders/ags001.shader/ags001.fs
@@ -4,18 +4,17 @@ uniform vec2 texSize;
void main() { vec4 color = texture2D(tex, texCoord); - vec3 arrayX[4]; - arrayX[0] = vec3(1.0, 0.2, 0.2); + vec3 arrayX[3]; + arrayX[0] = vec3(0.2, 0.2, 1.0); arrayX[1] = vec3(0.2, 1.0, 0.2); - arrayX[2] = vec3(0.2, 0.2, 1.0); - arrayX[3] = vec3(0.4, 0.4, 0.4); + arrayX[2] = vec3(1.0, 0.2, 0.2); vec3 arrayY[4]; arrayY[0] = vec3(1.0, 1.0, 1.0); arrayY[1] = vec3(1.0, 1.0, 1.0); arrayY[2] = vec3(1.0, 1.0, 1.0); arrayY[3] = vec3(0.9, 0.9, 0.9); color.rgb = pow(color.rgb, vec3(1.6, 1.6, 1.6)); - color.rgb *= arrayX[int(mod(texCoord.s * texSize.x * 4.0, 4.0))]; + color.rgb *= arrayX[int(mod(texCoord.s * texSize.x * 3.0, 3.0))]; color.rgb *= arrayY[int(mod(texCoord.t * texSize.y * 4.0, 4.0))]; color.a = 0.8; gl_FragColor = color;
M
res/shaders/ags001.shader/manifest.ini
→
res/shaders/ags001.shader/manifest.ini
@@ -7,12 +7,12 @@
[pass.0] fragmentShader=ags001.fs blend=1 -width=-4 +width=-3 height=-4 [pass.1] fragmentShader=ags001-light.fs -width=-4 +width=-3 height=-4 [pass.1.uniform.lightBrightness]