Make indentation consistent on mGBA LCD shaders

This commit is contained in:
Monroe88 2018-03-24 16:17:10 -05:00
parent 97100730fb
commit 890f98d809
3 changed files with 25 additions and 25 deletions

View file

@ -13,10 +13,10 @@
layout(std140, set = 0, binding = 0) uniform UBO layout(std140, set = 0, binding = 0) uniform UBO
{ {
mat4 MVP; mat4 MVP;
vec4 OutputSize; vec4 OutputSize;
vec4 OriginalSize; vec4 OriginalSize;
vec4 SourceSize; vec4 SourceSize;
} global; } global;
#pragma stage vertex #pragma stage vertex
@ -26,8 +26,8 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord; vTexCoord = TexCoord;
} }
#pragma stage fragment #pragma stage fragment

View file

@ -13,19 +13,19 @@
layout(std140, set = 0, binding = 0) uniform UBO layout(std140, set = 0, binding = 0) uniform UBO
{ {
mat4 MVP; mat4 MVP;
vec4 OutputSize; vec4 OutputSize;
vec4 OriginalSize; vec4 OriginalSize;
vec4 SourceSize; vec4 SourceSize;
} global; } global;
layout(push_constant) uniform Push layout(push_constant) uniform Push
{ {
float reflectionBrightness; float reflectionBrightness;
float reflectionDistanceX; float reflectionDistanceX;
float reflectionDistanceY; float reflectionDistanceY;
float lightBrightness; float lightBrightness;
} params; }params;
#pragma parameter reflectionBrightness "Reflection brightness" 0.07 0.0 1.0 0.01 #pragma parameter reflectionBrightness "Reflection brightness" 0.07 0.0 1.0 0.01
#pragma parameter reflectionDistanceX "Reflection Distance X" 0.0 -1.0 1.0 0.005 #pragma parameter reflectionDistanceX "Reflection Distance X" 0.0 -1.0 1.0 0.005
@ -39,8 +39,8 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord; vTexCoord = TexCoord;
} }
#pragma stage fragment #pragma stage fragment
@ -54,7 +54,7 @@ const float coeff = 2.5;
void main() void main()
{ {
vec2 reflectionDistance = vec2(params.reflectionDistanceX,params.reflectionDistanceY); vec2 reflectionDistance = vec2(params.reflectionDistanceX,params.reflectionDistanceY);
float sp = pow(speed, params.lightBrightness); float sp = pow(speed, params.lightBrightness);
float dc = pow(decay, -params.lightBrightness); float dc = pow(decay, -params.lightBrightness);
float s = (sp - dc) / (sp + dc); float s = (sp - dc) / (sp + dc);
@ -69,6 +69,6 @@ void main()
vec4 reflection = texture(Source, vTexCoord - reflectionDistance); vec4 reflection = texture(Source, vTexCoord - reflectionDistance);
color.rgb += reflection.rgb * params.reflectionBrightness; color.rgb += reflection.rgb * params.reflectionBrightness;
color.a = 1.0; color.a = 1.0;
FragColor = color; FragColor = color;
} }

View file

@ -13,10 +13,10 @@
layout(std140, set = 0, binding = 0) uniform UBO layout(std140, set = 0, binding = 0) uniform UBO
{ {
mat4 MVP; mat4 MVP;
vec4 OutputSize; vec4 OutputSize;
vec4 OriginalSize; vec4 OriginalSize;
vec4 SourceSize; vec4 SourceSize;
} global; } global;
#pragma stage vertex #pragma stage vertex
@ -26,8 +26,8 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord; vTexCoord = TexCoord;
} }
#pragma stage fragment #pragma stage fragment