Hey everybody,
I have a question about coloring my drawings:
Im trying to add a fog effect to my 3d camera. As the distance gets bigger, the fog color is supposed to gradually turn completely opaque. I tried using love.graphics.setColor but it is only possible to 'tint' the drawable in the color. Set the color mode to 'combine' gives better results but still does not solve my problem.
Basically what i want is something like a color overlay with variable opacity that only covers the drawable.
So my question: Is there a) a way to achieve this in love or b) is there a libray/module which does that or c) any idea how to achieve this?
I really hope you can help me
Question about coloring images
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Question about coloring images
Have you tried drawing rectangles of varying opacity on top of the images? With love.graphics.rectangle and love.graphics.setColor, I mean.
When I write def I mean function.
Re: Question about coloring images
Already did that.The problem is that you need quite a few rectangles to get a smooth fog effect. This will result in a massive slowdown and I cant see the background anymore.
Re: Question about coloring images
setPixelEffectmode7 wrote:Hey everybody,
I have a question about coloring my drawings:
Im trying to add a fog effect to my 3d camera. As the distance gets bigger, the fog color is supposed to gradually turn completely opaque. I tried using love.graphics.setColor but it is only possible to 'tint' the drawable in the color. Set the color mode to 'combine' gives better results but still does not solve my problem.
Basically what i want is something like a color overlay with variable opacity that only covers the drawable.
So my question: Is there a) a way to achieve this in love or b) is there a libray/module which does that or c) any idea how to achieve this?
I really hope you can help me
Re: Question about coloring images
Thanks for the detailed answer
You're right shaders are the way to go here. Unfortunately I don't know anything about GL or GLSL. I would be totally thankful for everything that puts me in the right direction.
You're right shaders are the way to go here. Unfortunately I don't know anything about GL or GLSL. I would be totally thankful for everything that puts me in the right direction.
Who is online
Users browsing this forum: Bing [Bot] and 78 guests