{{newin (日本語)|[[11.0 (日本語)|11.0]]|110|type=関数}}
Sets the comparison mode used when sampling from a [[PixelFormat|depth texture]] in a shader.

Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D.

When using a depth texture with a comparison mode set in a shader, it must be declared as a <code>sampler2DShadow</code> and used in a GLSL 3 [[Shader]]. The result of accessing the texture in the shader will return a float between 0 and 1, proportional to the number of samples (up to 4 samples will be used if bilinear filtering is enabled) that passed the test set by the [[CompareMode|comparison]] operation.

Depth texture comparison can only be used with [[Texture:isReadable|readable]] depth-formatted [[Canvas]]es.
== 関数 ==
=== 概要 ===
<source lang="lua">
Texture:setDepthSampleMode( compare )
</source>
=== 引数 ===
{{param (日本語)|CompareMode|compare|The comparison mode used when sampling from this texture in a shader.}}
=== 返値 ===
ありません。
== 関数 ==
Disables depth texture comparison functionality for this texture.
=== 概要 ===
<source lang="lua">
Texture:setDepthSampleMode( )
</source>
=== 引数 ===
なし。
=== 返値 ===
ありません。
== 関連 ==
* [[parent::Texture (日本語)]]
* [[Texture:getDepthSampleMode (日本語)]]
* [[love.graphics.newCanvas (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Sets the comparison mode used when sampling from a [[PixelFormat|depth texture]] in a shader.}}
== そのほかの言語 ==
{{i18n (日本語)|Texture:setDepthSampleMode}}