Go to: Related nodes. Attributes.

Texture2d is the base node from which all the 2d texture nodes derive. Here you will find all the attributes that are common to all 2d textures.

In the table below, important attributes have their names shown in bold in the description column.

This node is abstract

This node is MP safe

Node name Parents Classification MFn type Compatible function sets
texture2d shadingDependNode
rendernode

Related nodes

layeredTexture, envCube, envSphere, envSky, envBall, envChrome, bump3d, uvChooser, bump2d, ramp, file, cloth, water, stencil, checker, fractal, bulge, grid, mountain, texture3d, projection, cloud, granite, crater, leather, stucco, brownian, solidFractal, marble, wood, rock, snow, defaultTextureList, place2dTexture, place3dTexture

Attributes (29)

alphaGain, alphaIsLuminance, alphaOffset, colorGain, colorGainB, colorGainG, colorGainR, colorOffset, colorOffsetB, colorOffsetG, colorOffsetR, defaultColor, defaultColorB, defaultColorG, defaultColorR, filter, filterOffset, invert, outAlpha, outColor, outColorB, outColorG, outColorR, uCoord, uvCoord, uvFilterSize, uvFilterSizeX, uvFilterSizeY, vCoord

Long name (short name) Type Default Flags
uvCoord (uv) float2 0.0, 0.0 outputinputconnectable
The UV coords of the current sample point
uCoord (u) float 0.0 outputinputconnectable
The u component of the current sample position
vCoord (v) float 0.0 outputinputconnectable
The v component of the current sample position
uvFilterSize (fs) float2 0.0, 0.0 outputinputconnectablehidden
uvFilterSize is the approximate size of a circular screenspace filter kernel projected into the [0,1] square uv-space of the texture. These values give you an idea of how much filtering is required so that your texture will not alias in your final image. So if you get values of (1,1.5) coming through the uvFilterSize attribute during shading, it means that the original circular screenspace filter has been projected to a roughly elliptical shape in your texture space, with major/minor axes of lengths 1 and 1.5, respectively.
uvFilterSizeX (fsx) float 0.0 outputinputconnectablehidden
The X size of the filter (sample)
uvFilterSizeY (fsy) float 0.0 outputinputconnectablehidden
The Y size of the filter (sample)
filter (f) float 1.0 outputinputconnectablestorable
Filter affects the amount of filtering performed on a texture. The amount of filtering the system does is calculated based on how much screen space the texture occupies in the final image. The Filter attribute is a multiplier on that value. Values greater than 1.0 will cause the renderer to do more filtering. This will make the texture blurier. Increase the amount of filtering if there is aliasing (i.e. jagged staircase effects) in your final renderings, or if the texture appears to "pop" or "sizzle" over the course of several frames. Values less than 1.0 will cause the renderer to do less filtering. This will make the texture appear sharper. Decrease the amount of filtering. if your textures are appearing too blurry in the final rendered images. This attribute does not do anything if this is a Bulge, Cloth, Ramp, or Water texture. See also the Filter Offset attribute (below).
filterOffset (fo) float 0.0 outputinputconnectablestorable
Filter Offset affects the amount of filtering performed on a texture. Unlike the Filter attribute (which is a multiplier), Filter Offset is added to the system's calculated filtering values. This increases the amount of filtering uniformly. This attribute can be used to "lock" the system's filtering values. To do this, set the Filter attribute to 0. Then the Filter Offset value will completely determine the amount of filtering. This attribute does not do anything if this is a Bulge, Cloth, Ramp, or Water texture.
invert (i) bool false outputinputconnectablestorablekeyable
Invert is used to reverse the color values of the texture. When Invert is turned on, white becomes black, black becomes white, red becomes cyan, yellow becomes blue, etc. This is most often used when the texture is being applied as a bump map. Turning on Invert makes the bump appear to turn inside-out, with hills becoming valleys and vice-versa.
alphaIsLuminance (ail) bool false outputinputconnectablestorablekeyable
Alpha Is Luminance can be turned on to make the alpha (mask) output of this node depend on the luminance of the texture. This means that bright areas of the texture will be more opaque when compositing, and dark areas will be more transparent. This attribute is not used in textures of type Cloth, Ramp, or Stencil.
colorGain (cg) float3 1.0, 1.0, 1.0 outputinputconnectablestorable
Use Color Gain to fine-tune the balance of a texture's Out Color. Color Gain is applied as a multiplier to the texture's color. If Color Gain is white, it has no effect. Reducing the amount of red (for example) in Color Gain will scale down the amount of red in the final output color.
colorGainR (cgr) float 0.0 outputinputconnectablestorablekeyable
Color Gain Red Value
colorGainG (cgg) float 0.0 outputinputconnectablestorablekeyable
Color Gain Green Value
colorGainB (cgb) float 0.0 outputinputconnectablestorablekeyable
Color Gain Blue Value
colorOffset (co) float3 0.0, 0.0, 0.0 outputinputconnectablestorable
Use Color Offset to brighten and adjust a texture's Out Color. Unlike Color Gain (which is a multiplier), Color Offset is simply added to the texture's Out Color. Therefore if Color Offset is black, it has no effect. Increasing the amount of red (for example) in Color Offset will uniformly increase the amount of red in the final output color.
colorOffsetR (cor) float 0.0 outputinputconnectablestorablekeyable
Color Offset red value.
colorOffsetG (cog) float 0.0 outputinputconnectablestorablekeyable
Color Offset green value
colorOffsetB (cob) float 0.0 outputinputconnectablestorablekeyable
Color Offset blue value
alphaGain (ag) float 1.0 outputinputconnectablestorablekeyable
Alpha Gain is a multiplier that affects the alpha (mask) channel. If this texture is being used as a bump map or a displacement map, you can adjust Alpha Gain to scale the amount of bumping.
alphaOffset (ao) float 0.0 outputinputconnectablestorablekeyable
Alpha Offset is a value that is added to the alpha (mask) channel. This can be used to uniformly increase the effect of the texture.
defaultColor (dc) float3 0.5, 0.5, 0.5 outputinputconnectablestorable
Default Color is the color of the texture in the areas that are not mapped. If the placement of this texture is not covering an entire surface, then Default Color will be used in the areas not covered.
defaultColorR (dcr) float 0.0 outputinputconnectablestorablekeyable
Default Color red value.
defaultColorG (dcg) float 0.0 outputinputconnectablestorablekeyable
Default Color green value.
defaultColorB (dcb) float 0.0 outputinputconnectablestorablekeyable
Default Color blue value.
outColor (oc) float3 0.0, 0.0, 0.0 outputconnectable
Out Color is the color computed by this texture. Connect this value to a Color attribute of a shader or another texture to texture map that color.
outColorR (ocr) float 0.0 outputconnectable
Out Color red value.
outColorG (ocg) float 0.0 outputconnectable
Out Color green value.
outColorB (ocb) float 0.0 outputconnectable
Out Color blue value.
outAlpha (oa) float 0.0 outputconnectable
Out Alpha is the alpha (mask) value computed by texture. Connect this value to a bump node or a displacement node of a shader to use this texture as a bump or displacement map.