summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/quad.vert6
-rw-r--r--resources/shader.frag4
2 files changed, 6 insertions, 4 deletions
diff --git a/resources/quad.vert b/resources/quad.vert
index acf00b2..bc9cb36 100644
--- a/resources/quad.vert
+++ b/resources/quad.vert
@@ -6,14 +6,16 @@ layout(location = 1) in vec2 uv;
out vec2 UV;
uniform mat4 MVP;
+uniform mat4 modelPosition;
void main() {
gl_Position =
MVP *
- vec4( pos.x, pos.y, 0, 1);
- UV = uv;
+ //modelPosition *
+ vec4(pos.x, pos.y, 0, 1);
//vec4(pos.x, 1.0, pos.y, 1.0);
+ UV = uv;
//fragColor.x = gl_Position.x;
//fragColor.y = gl_Position.y;
diff --git a/resources/shader.frag b/resources/shader.frag
index 1532caa..b4f60c9 100644
--- a/resources/shader.frag
+++ b/resources/shader.frag
@@ -12,12 +12,12 @@ void main() {
vec3 light_color_ambient = vec3(0.55, 0.55, 1.0);
vec3 light_color_diffuse = vec3(1.0, 0.98, 0.84);
- vec3 lightpos = vec3(7, 17, 10);
+ vec3 lightpos = vec3(7, 65, 10);
float ambient_strength = 0.45;
vec3 ambient = ambient_strength * light_color_ambient;
- vec3 norm = normalize(Normal);
+ vec3 norm = -normalize(Normal);
vec3 light_dir = normalize(lightpos - FragmentPos);
float diff = max(dot(norm, light_dir), 0.0);