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

Author Topic: Help with Day/Night Cycle  (Read 1352 times)

0 Members and 1 Guest are viewing this topic.

gamecoder.nz

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Help with Day/Night Cycle
« on: April 24, 2020, 09:51:19 am »
What I have done so far is to create a RenderTexture and colored it black.  Then I have drawn the attached white circle onto it.  Then in the game I drew it onto the main RenderTexture with sf::BlendMultiply.    The result is attached and it is half way to what I want.  I want to be able to turn the opacity of the black down so I can see everything else but I don't know how to do that.  I tried using a shader but with no success.


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Help with Day/Night Cycle
« Reply #1 on: April 24, 2020, 11:35:28 am »
Simply fill the render-texture with gray instead of black.
Laurent Gomila - SFML developer

 

anything