Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to handle tons of 2D lights using GLSL shaders efficiently?  (Read 7114 times)

0 Members and 1 Guest are viewing this topic.

Fililip

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: How to handle tons of 2D lights using GLSL shaders efficiently?
« Reply #15 on: April 01, 2018, 07:19:18 pm »
I was trying to learn how to do deferred rendering properly and since I don't really want to go 3D yet, I just wanted to try to implement it in 2D to see if I understood it correctly.
You know, I've been trying to understand deferred shading for like 3 weeks and I still think I did not implement it correctly. (I just could not get any help with my problem, and I've been looking for the solution everywhere)
The only thing I wanted to achieve was to finally understand how it should be implemented.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to handle tons of 2D lights using GLSL shaders efficiently?
« Reply #16 on: April 02, 2018, 09:15:36 am »
If you want to optimize your SFML based lighting system, we can probably help you. But now if your goal is to learn deferred rendering, then the SFML forum may not be the best place, we're not experts at this kind of stuff ;)
Laurent Gomila - SFML developer

Fililip

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: How to handle tons of 2D lights using GLSL shaders efficiently?
« Reply #17 on: April 02, 2018, 12:20:33 pm »
So which tutorials do you actually recommend that'll help me understand EVERYTHING that needs to be done to display these huge amounts of lights? I could not really find what I was looking for since most of them revolve around 3D and I'm not working in 3D, but rather 2D.
(Because if I understood the entire process correctly, deferred rendering (2D) is basically rendering the scene once, then all the lights by drawing circles, using a lighting shader on each one of them, and multiplying the result (or instantly drawing on one texture) to finally blit the finalized scene to the window's buffer.)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to handle tons of 2D lights using GLSL shaders efficiently?
« Reply #18 on: April 02, 2018, 05:58:12 pm »
Quote from: Laurent
You can have a look at this recent SFML project for interesting explanations and links on the subject:
https://en.sfml-dev.org/forums/index.php?topic=23751.0

Quote
So which tutorials do you actually recommend that'll help me understand EVERYTHING that needs to be done to display these huge amounts of lights?
I have already said all I know, if you don't want to try my suggestions then there's nothing else I can do for you.
« Last Edit: April 02, 2018, 05:59:55 pm by Laurent »
Laurent Gomila - SFML developer

Fililip

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: How to handle tons of 2D lights using GLSL shaders efficiently?
« Reply #19 on: April 02, 2018, 07:14:48 pm »
I checked out this topic and it doesn't really explain how it's done (it's not a tutorial), and the only thing linked to it is the LearnOpenGL website which does not really help me understand how things work in 2D.