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 ObjectRefCountedResource Shader
A shader implemented in the Godot shading language.

A custom shader program implemented in the Godot shading language, saved with the .gdshader extension.

This class is used by a ShaderMaterial and allows you to write your own custom behavior for rendering visual items or updating particle information. For a detailed explanation and usage, please see the tutorials linked below.

Enum Mode<>():Enum

MODE_SPATIAL = 0

Mode used to draw all 3D objects.


MODE_CANVAS_ITEM = 1

Mode used to draw all 2D objects.


MODE_PARTICLES = 2

Mode used to calculate particle information on a per-particle basis. Not used for drawing.


MODE_SKY = 3

Mode used for drawing skies. Only works with shaders attached to Sky objects.


MODE_FOG = 4

Mode used for setting the color and density of volumetric fog effect.

String code<>():String

Returns the shader's code as the user has written it, not the full generated code used internally.

Texture2D get_default_texture_parameter<>( StringName name=, name:StringName=, int index=0, index:int=0, ):Texture2D

Returns the texture that is set as default for the specified parameter.

Note: name must match the name of the uniform in the code exactly.

Note: If the sampler array is used use index to access the specified texture.

Mode get_mode<>():Mode

Returns the shader mode for the shader.

Array get_shader_uniform_list<>( bool get_groups=false, get_groups:bool=false, ):Array

Get the list of shader uniforms that can be assigned to a ShaderMaterial, for use with ShaderMaterial.set_shader_parameter and ShaderMaterial.get_shader_parameter. The parameters returned are contained in dictionaries in a similar format to the ones returned by Object.get_property_list.

If argument get_groups is true, parameter grouping hints will be provided.

void set_default_texture_parameter<>( StringName name=, name:StringName=, Texture2D texture=, texture:Texture2D=, int index=0, index:int=0, ):void

Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the ShaderMaterial.

Note: name must match the name of the uniform in the code exactly.

Note: If the sampler array is used use index to access the specified texture.




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...