{{newin|[[0.9.0]]|090|type=function|text=It has been renamed from [[love.graphics.setPixelEffect]]}}

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

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

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

== 用例 ==
=== Drawing a rectangle using a pixel effect shader ===
<source lang="lua">
function love.load()
    effect = love.graphics.newShader [[
        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.setShader()
    love.graphics.rectangle('fill', 10,10,780,285)

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

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

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

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