Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

109 Neutral

About mateo226

  • Rank
  1. Thank you for the provided code! I helps me understand this ALOT more.   But for now, I am going to switch to some good old fashioned Beginner GLSL Tutorials lol :)   Once again, thanks a bunch!
  2. Well, since I can't find any good tutorials on how to do lightning in 2D I am stuck with whatever I can find   I'll see what I can do with shaders. Hoping to implement lightning soon   Oh, and are you talking about drawing a quad in the center using ONLY GLSL or using Java aswell? Because In Java it's way to easy... glBegin(GL_QUADS); glVertex2f(...).... Sorry I'm to lazy to write it down now   EDIT: Alright just saw you edited your last post. I'm looking at it super confused haha
  3. Haha ofc I do! :P That is the easiest thing to do :) I am now looking at this tutorial, to see if I can come up with something: http://nehe.gamedev.net/article/glsl_an_introduction/25007/
  4. Thanks WiredCat! I understand the concept fully now :) Still kind of confused with the actual code... From other sources on the net I realised that lightning is actually making an image darker. I would need to render my normal scene and a black rectangle on top of it. Then add transparency or coloring where the light is.   Once again, still confused with the code :) I could REALLY use an example, it would be easier to learn.   Thank you very much for your answer!
  5. Hey, thanks for you answer! I already saw this but it doesn't really show me how to do it with code. Hopefully I will find something :) Been searching for 2 Days.... Even posted a question on Stack Overflow....
  6. Hello everyone! I am new to this forum so sorry it I posted this in the wrong section. Anyways, I want to create 2D lightning with GLSL just like here:   And here:   I am using Java for my game. I was just wondering, how would I achieve this? I am currently able to draw a light using LWJGL's built in functions like glLight but I am not sure how to add lights like in the videos!   Please help I've been searching the net for 2 days but without any success... Any help would be appreciated! Thank you very much!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!