No more setColorMode? >:(
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
No more setColorMode? >:(
Is there any replacement for this? I can't find one. I really don't want to have to use shaders for something this trivial.
- slime
- Solid Snayke
- Posts: 3160
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: No more setColorMode? >:(
love.graphics.setColor(255, 255, 255) achieves the same result as love.graphics.setColorMode("replace"), and "modulate" is the default anyway, so 2/3 of the possible ColorModes are redundant.
On top of that, they didn't even work at all when a shader was active (since shaders completely supersede their functionality) - and they would have to be emulated using shaders anyway on OpenGL ES and modern OpenGL 3+, since they aren't supported with fixed-functionality in the more modern APIs.
The "combine" ColorMode was fairly arbitrary. But it's easy to reproduce it in a pixel shader.
On top of that, they didn't even work at all when a shader was active (since shaders completely supersede their functionality) - and they would have to be emulated using shaders anyway on OpenGL ES and modern OpenGL 3+, since they aren't supported with fixed-functionality in the more modern APIs.
The "combine" ColorMode was fairly arbitrary. But it's easy to reproduce it in a pixel shader.
Code: Select all
vec4 effect(vec4 vcolor, Image texture, vec2 texcoord, vec2 pixcoord)
{
vec4 texcolor = Texel(texture, texcoord);
return vec4(texcolor.rgb + vcolor.rgb - vec3(0.5), texcolor.a);
}
Last edited by slime on Mon Dec 16, 2013 6:41 am, edited 1 time in total.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: No more setColorMode? >:(
That was/is a blend mode.
Who is online
Users browsing this forum: Google [Bot] and 0 guests