mirror of https://github.com/mgba-emu/mgba.git
Res: Improve modeling of AGB/AGS screen in shaders
This commit is contained in:
parent
6617a9dccd
commit
aa90dbbc92
3
CHANGES
3
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 @@ Misc:
|
|||
- 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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -7,5 +7,5 @@ passes=1
|
|||
[pass.0]
|
||||
fragmentShader=agb001.fs
|
||||
blend=1
|
||||
width=-4
|
||||
width=-3
|
||||
height=-4
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -7,12 +7,12 @@ passes=2
|
|||
[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]
|
||||
|
|
Loading…
Reference in New Issue