class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCountedResourceTextureTexture2D CanvasTexture
Texture with optional normal and specular maps for use in 2D rendering.
CanvasTexture is an alternative to ImageTexture for 2D rendering. It allows using normal maps and specular maps in any node that inherits from CanvasItem. CanvasTexture also allows overriding the texture's filter and repeat mode independently of the node's properties (or the project settings).
Note: CanvasTexture cannot be used in 3D. It will not display correctly when applied to any VisualInstance3D, such as Sprite3D or Decal. For physically-based materials in 3D, use BaseMaterial3D instead.
set get Texture2D diffuse_texture<>():Texture2D set get
The diffuse (color) texture to use. This is the main texture you want to set in most cases.

set get Texture2D normal_texture<>():Texture2D set get
The normal map texture to use. Only has a visible effect if Light2Ds are affecting this CanvasTexture.

Note: Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
set get bool resource_local_to_scene<>():bool set get
set get Color specular_color<>():Color set get
The multiplier for specular reflection colors. The Light2D's color is also taken into account when determining the reflection color. Only has a visible effect if Light2Ds are affecting this CanvasTexture.

set get float specular_shininess<>():float set get
The specular exponent for Light2D specular reflections. Higher values result in a more glossy/"wet" look, with reflections becoming more localized and less visible overall. The default value of 1.0 disables specular reflections entirely. Only has a visible effect if Light2Ds are affecting this CanvasTexture.

set get Texture2D specular_texture<>():Texture2D set get
The specular map to use for Light2D specular reflections. This should be a grayscale or colored texture, with brighter areas resulting in a higher specular_shininess value. Using a colored specular_texture allows controlling specular shininess on a per-channel basis. Only has a visible effect if Light2Ds are affecting this CanvasTexture.

set get int texture_filter<>():int set get
The texture filtering mode to use when drawing this CanvasTexture.

set get int texture_repeat<>():int set get
The texture repeat mode to use when drawing this CanvasTexture.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...