{{newinoldin|[[0.8.0]]|080|[[0.9.0]]|090|type=function|text=It has been renamed to [[love.graphics.setShader]]}}

Sets or resets a [[PixelEffect]] as the current pixel effect. All drawing operations until the next ''love.graphics.setPixelEffect'' will be drawn using the [[PixelEffect]] object specified.

== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.setPixelEffect( pixeleffect )
</source>
=== 引数 ===
{{param (日本語)|PixelEffect|pixeleffect|The new pixel effect.}}
=== 返値 ===
ありません。
=== 注釈 ===
Sets the current pixel shader to a specified [[PixelEffect]]. All drawing operations until the next ''love.graphics.setPixelEffect'' will be drawn using the [[PixelEffect]] object specified.

== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.setPixelEffect( )
</source>
=== 引数 ===
なし。
=== 返値 ===
ありません。
=== 注釈 ===
Disables pixel effects, allowing unfiltered drawing operations.

== 用例 ==
=== Drawing a rectangle using a pixel effect ===
<source lang="lua">
function love.load()
    effect = love.graphics.newPixelEffect [[
        extern number time;
        vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 pixel_coords)
        {
            return vec4((1.0+sin(time))/2.0, abs(cos(time)), abs(sin(time)), 1.0);
        }
    ]]
end

function love.draw()
    -- boring white
    love.graphics.setPixelEffect()
    love.graphics.rectangle('fill', 10,10,790,285)

    -- LOOK AT THE PRETTY COLORS!
    love.graphics.setPixelEffect(effect)
    love.graphics.rectangle('fill', 10,305,790,285)
end

local t = 0
function love.update(dt)
    t = t + dt
    effect:send("time", t)
end
</source>

== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[PixelEffect (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Routes drawing operations through a pixel shader.}}
{{#set:Sub-Category=State (日本語)}}

== そのほかの言語 ==
{{i18n (日本語)|love.graphics.setPixelEffect}}