Although the Love.graphics.setColorMode had cancel from 0.90
-
- Prole
- Posts: 47
- Joined: Thu Sep 24, 2009 1:49 pm
Although the Love.graphics.setColorMode had cancel from 0.90
Although the Love.graphics.setColorMode had cancel from 0.90,which function is replace this?
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Although the Love.graphics.setColorMode had cancel from
The "modulate" ColorMode was the default in 0.8.0, and its functionality (multiplying the current color with the texture) is still the default in 0.9.0.
The effects of the "replace" ColorMode can be duplicated by calling love.graphics.setColor(255, 255, 255).
The "combine" ColorMode can be duplicated via a pixel shader. The shader code would look something like this:
The effects of the "replace" ColorMode can be duplicated by calling love.graphics.setColor(255, 255, 255).
The "combine" ColorMode can be duplicated via a pixel shader. The shader code would look something like this:
Code: Select all
shader = love.graphics.newShader[[
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);
}
]]
-
- Prole
- Posts: 47
- Joined: Thu Sep 24, 2009 1:49 pm
Re: Although the Love.graphics.setColorMode had cancel from
OK,thank you.
It seem be complex
It seem be complex
Re: Although the Love.graphics.setColorMode had cancel from
@slime: can you add this to the wiki. thx.
Who is online
Users browsing this forum: No registered users and 11 guests