]> code.bitgloo.com Git - clyne/gamedev2.git/commitdiff
Made lighting a bit softer
authorAndy Belle-Isle <drumsetmonkey@gmail.com>
Mon, 2 Sep 2019 04:15:35 +0000 (00:15 -0400)
committerAndy Belle-Isle <drumsetmonkey@gmail.com>
Mon, 2 Sep 2019 04:15:35 +0000 (00:15 -0400)
Scripts/init.lua
Shaders/world.frag
src/render.cpp

index 37b1f0d7be19ef5978e4e2fb99917a64e531d575..9b8912f5e68ed799b31397956af53bf4988112b9 100644 (file)
@@ -9,10 +9,6 @@ bird = {
         y = 0.0
     },
     Name = "bord",
-    Init = function(self)
-        print(self.Position.x .. "," .. self.Position.y)
-        print("Bird spawn")
-    end,
     Render = {
         texture = "Assets/player.png",
         visible = true
@@ -47,9 +43,6 @@ cat = {
         normal = "Assets/cat_normal.png",
         visible = true
     },
-    Init = function(self)
-        print(self.Position.x .. "," .. self.Position.y)
-    end,
     counter = 0;
     Idle = function(self)
         self.Velocity.x = -100 * math.sin(math.rad(self.counter));
index 5ef399dedcd7974857696706f54c601339368b9e..4a17a937260f04b1423d70afc5b4d12082f6a642 100644 (file)
@@ -19,8 +19,6 @@ uniform int LightNum;
 
 void main()
 {
-    //vec3 LightPos = vec3(0.0, 0.0, 0.0);
-    //vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);
     vec3 Falloff = vec3(0.1, 0.2, 0.0);
 
     vec4 DiffuseColor = texture2D(textu, texCoord);
index bd168edcce26d210866a4173b82437c2947be97d..d9cc054638dc354ababe5306d956c19797448822 100644 (file)
@@ -94,7 +94,7 @@ void RenderSystem::update([[maybe_unused]] entityx::EntityManager& entities,
         [&]
         (entityx::Entity, Light &l, Position &p){
 
-        lightPos.push_back(glm::vec3(p.x, p.y, 0.0));
+        lightPos.push_back(glm::vec3(p.x, p.y,-10.0));
         lightColor.push_back(glm::vec4(l.r, l.g, l.b, l.strength));
         lightNum++;
     });