'\" t .\" Title: texture .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "TEXTURE" "3G" "05/21/2015" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" texture \- retrieves texels from a texture .SH "DECLARATION" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsampler1D\ " "sampler" ", float\ " "P" ", [float\ " "bias" "]);" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsampler2D\ " "sampler" ", vec2\ " "P" ", [float\ " "bias" "]);" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsampler3D\ " "sampler" ", vec3\ " "P" ", [float\ " "bias" "]);" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsamplerCube\ " "sampler" ", vec3\ " "P" ", [float\ " "bias" "]);" .HP \w'float\ texture('u .BI "float texture(sampler1DShadow\ " "sampler" ", vec3\ " "P" ", [float\ " "bias" "]);" .HP \w'float\ texture('u .BI "float texture(sampler2DShadow\ " "sampler" ", vec3\ " "P" ", [float\ " "bias" "]);" .HP \w'float\ texture('u .BI "float texture(samplerCubeShadow\ " "sampler" ", vec3\ " "P" ", [float\ " "bias" "]);" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsampler1DArray\ " "sampler" ", vec2\ " "P" ", [float\ " "bias" "]);" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsampler2DArray\ " "sampler" ", vec3\ " "P" ", [float\ " "bias" "]);" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsamplerCubeArray\ " "sampler" ", vec4\ " "P" ", [float\ " "bias" "]);" .HP \w'float\ texture('u .BI "float texture(sampler1DArrayShadow\ " "sampler" ", vec3\ " "P" ", [float\ " "bias" "]);" .HP \w'float\ texture('u .BI "float texture(gsampler2DArrayShadow\ " "sampler" ", vec4\ " "P" ", [float\ " "bias" "]);" .HP \w'gvec4\ texture('u .BI "gvec4 texture(gsampler2DRect\ " "sampler" ", vec2\ " "P" ");" .HP \w'float\ texture('u .BI "float texture(sampler2DRectShadow\ " "sampler" ", vec3\ " "P" ");" .HP \w'float\ texture('u .BI "float texture(gsamplerCubeArrayShadow\ " "sampler" ", vec4\ " "P" ", float\ " "compare" ");" .SH "PARAMETERS" .PP \fIsampler\fR .RS 4 Specifies the sampler to which the texture from which texels will be retrieved is bound\&. .RE .PP \fIP\fR .RS 4 Specifies the texture coordinates at which texture will be sampled\&. .RE .PP \fIbias\fR .RS 4 Specifies an optional bias to be applied during level\-of\-detail computation\&. .RE .PP \fIcompare\fR .RS 4 Specifies the value to which the fetched texel will be compared when sampling from gsamplerCubeArrayShadow\&. .RE .SH "DESCRIPTION" .PP \fBtexture\fR samples texels from the texture bound to \fIsampler\fR at texture coordinate \fIP\fR\&. An optional bias, specified in \fIbias\fR is included in the level\-of\-detail computation that is used to choose mipmap(s) from which to sample\&. .PP For \fIshadow\fR forms, when \fIcompare\fR is present, it is used as Dsub and the array layer is specified in \fIP\fR\&.w\&. When \fIcompare\fR is not present, the last component of \fIP\fR is used as Dsub and the array layer is specified in the second to last component of \fIP\fR\&. (The second component of \fIP\fR is unused for \fI1D\fR shadow lookups\&.) .PP For non\-shadow variants, the array layer comes from the last component of \fIP\fR\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Shading Language Version\fR T} T{ \fBFunction Name\fR T}:T{ \fB1\&.10\fR T}:T{ \fB1\&.20\fR T}:T{ \fB1\&.30\fR T}:T{ \fB1\&.40\fR T}:T{ \fB1\&.50\fR T}:T{ \fB3\&.30\fR T}:T{ \fB4\&.00\fR T}:T{ \fB4\&.10\fR T}:T{ \fB4\&.20\fR T}:T{ \fB4\&.30\fR T}:T{ \fB4\&.40\fR T}:T{ \fB4\&.50\fR T} .T& l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ texture T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ texture (gsampler2DRect{Shadow}) T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ texture (gsampler2DMS, gsampler2DMSArray) T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ texture (gsamplerCubeArray{Shadow}) T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp .SH "SEE ALSO" .PP \fBtexelFetch\fR(), \fBtexelFetchOffset\fR(), \fBtextureGather\fR(), \fBtextureGatherOffset\fR(), \fBtextureGatherOffsets\fR(), \fBtextureGrad\fR(), \fBtextureGradOffset\fR(), \fBtextureLod\fR(), \fBtextureLodOffset\fR(), \fBtextureOffset\fR(), \fBtextureProj\fR(), \fBtextureProjGrad\fR(), \fBtextureProjGradOffset\fR(), \fBtextureProjLod\fR(), \fBtextureProjLodOffset\fR(), \fBtextureProjOffset\fR(), \fBtextureQueryLod\fR(), \fBtextureSize\fR() .SH "COPYRIGHT" .PP Copyright \(co 2011\-2014 Khronos Group\&. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1\&.0, 8 June 1999\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2011-2014 Khronos Group .br