all repos — mgba @ 782f6191e51b16211d1f783d0ae61aac722c54d3

mGBA Game Boy Advance Emulator

Shaders: Fix lighting direction for AGS-001
Jeffrey Pfau jeffrey@endrift.com
Sun, 01 Nov 2015 19:15:17 -0800
commit

782f6191e51b16211d1f783d0ae61aac722c54d3

parent

d160647fff2c42fcbaf19122469b749a0b355c29

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M res/shaders/ags001.shader/ags001.fsres/shaders/ags001.shader/ags001.fs

@@ -16,9 +16,10 @@ arrayY[3] = vec3(0.8, 0.8, 0.8);

vec3 bleed = vec3(0.7, 0.7, 0.7); vec2 radius = (texCoord.st - vec2(0.5, 0.5)) * vec2(1.5, 1.5); bleed += (pow(dot(radius, radius), 3.0) + vec3(0.06, 0.1, 0.2)) * vec3(0.8, 0.88, 1.2); - color.rgb = pow(color.rgb + vec3(0.1, 0.12, 0.2), vec3(1.6, 1.6, 1.6)) * bleed + vec3(0.16, 0.18, 0.22); + color.rgb = pow(color.rgb + vec3(0.1, 0.12, 0.2), vec3(1.6, 1.6, 1.6)) * bleed; color.rgb *= arrayX[int(mod(texCoord.s * 960.0, 4.0))]; color.rgb *= arrayY[int(mod(texCoord.t * 640.0, 4.0))]; + color.rgb += vec3(0.16, 0.18, 0.22); color.a = 0.5; gl_FragColor = color; }