Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1287

Comment by HolyBlackCat on Light chasing the player in SDL2

$
0
0
A simple answer is to make the texture larger, so that you can draw it off-center without exposing the opposite edge. A smarter answer is to create a lighting texture and render to it (fill with black, draw a white blurred circle where you want the light to be), then draw it on top of everything else with the blend mode set to "multiply".

Viewing all articles
Browse latest Browse all 1287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>