BBMOD_TerrainShader

A constructor defined in BBMOD_TerrainShader.gml

Extends BBMOD_BaseShader

new BBMOD_TerrainShader()

Description

Base class for BBMOD terrain shaders.

Arguments

Name Type Description
_shader Asset.GMShader The shader resource.
_vertexFormat Struct.BBMOD_VertexFormat The vertex format required by the shader.

Properties

Name Description
LayersPerDrawCall Number of terrain layers that this shader can render in a single draw call. Default value is 1. Hard maximum is 3 because of limited number of texture samplers.
MaxLayers Maximum number of terrain layers that this shader supports. Default value is 5.

Inherited properties

Name Description
MaxPunctualLights DEPRECATED Maximum number of punctual lights in the shader.

Inherited methods

Name Description
add_variant Adds a shader variant to be used with a specific vertex format.
get_variant Retrieves a shader variant for given vertex format.
has_variant Checks whether the shader has a variant for given vertex format.
is_compiled Checks whether all shader variants are compiled.
is_current Checks if the shader is currently in use.
on_reset A function executed when the shader is reset.
on_set A function executed when the shader is set.
reset Unsets the shaders.
set Sets the shader as the current shader.
set_alpha_test DEPRECATED Sets the BBMOD_U_ALPHA_TEST uniform.
set_ambient_light DEPRECATED Sets the BBMOD_U_LIGHT_AMBIENT_UP, BBMOD_U_LIGHT_AMBIENT_DOWN and BBMOD_U_LIGHT_AMBIENT_DIR_UP uniforms.
set_batch_data DEPRECATED Sets the BBMOD_U_BATCH_DATA uniform.
set_bones DEPRECATED Sets the BBMOD_U_BONES uniform.
set_cam_pos DEPRECATED Sets a fragment shader uniform BBMOD_U_CAM_POS to the given position.
set_directional_light DEPRECATED Sets uniforms BBMOD_U_LIGHT_DIRECTIONAL_DIR and BBMOD_U_LIGHT_DIRECTIONAL_COLOR.
set_exposure DEPRECATED Sets the BBMOD_U_EXPOSURE uniform.
set_fog DEPRECATED Sets uniforms BBMOD_U_FOG_COLOR, BBMOD_U_FOG_INTENSITY, BBMOD_U_FOG_START and BBMOD_U_FOG_RCP_RANGE.
set_ibl DEPRECATED Sets a fragment shader uniforms BBMOD_U_IBL_ENABLE, BBMOD_U_IBL_TEXEL and BBMOD_U_IBL. These are required for image based lighting.
set_instance_id DEPRECATED Sets the BBMOD_U_INSTANCE_ID uniform.
set_material Sets shader uniforms using values from the material.
set_material_index DEPRECATED Sets the BBMOD_U_MATERIAL_INDEX uniform.
set_point_lights DEPRECATED Sets uniforms BBMOD_U_LIGHT_PUNCTUAL_DATA_A and BBMOD_U_LIGHT_PUNCTUAL_DATA_B.
set_punctual_lights DEPRECATED Sets uniforms BBMOD_U_LIGHT_PUNCTUAL_DATA_A and BBMOD_U_LIGHT_PUNCTUAL_DATA_B.
set_texture_offset DEPRECATED Sets the BBMOD_U_TEXTURE_OFFSET uniform to the given offset.
set_texture_scale DEPRECATED Sets the BBMOD_U_TEXTURE_SCALE uniform to the given scale.
Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on April 26, 2024 using GMDoc.