BBMOD_BaseShader

Extends BBMOD_Shader

constructor

new BBMOD_BaseShader(_shader, _vertexFormat)

Description

Base class for BBMOD 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
MaxPointLights OBSOLETE Maximum number of point lights in the shader. This must match with value defined in the raw GameMaker shader!
MaxPunctualLights Maximum number of punctual lights in the shader. This must match with value defined in the raw GameMaker shader!

Methods

Name Description
set_alpha_test Sets the bbmod_AlphaTest uniform.
set_ambient_light Sets the bbmod_LightAmbientUp, bbmod_LightAmbientDown uniforms.
set_batch_data Sets the bbmod_BatchData uniform.
set_bones Sets the bbmod_Bones uniform.
set_cam_pos Sets a fragment shader uniform bbmod_CamPos to the given position.
set_directional_light Sets uniforms bbmod_LightDirectionalDir and bbmod_LightDirectionalColor.
set_exposure Sets the bbmod_Exposure uniform.
set_fog Sets uniforms bbmod_FogColor, bbmod_FogIntensity, bbmod_FogStart and bbmod_FogRcpRange.
set_ibl Sets a fragment shader uniform bbmod_IBLTexel and samplers bbmod_IBL and bbmod_BRDF. These are required for image based lighting.
set_instance_id Sets the bbmod_InstanceID uniform.
set_material Sets shader uniforms using values from the material.
set_material_index Sets the bbmod_MaterialIndex uniform.
set_point_lights DEPRECATED Sets uniforms bbmod_LightPunctualDataA and bbmod_LightPunctualDataB.
set_punctual_lights Sets uniforms bbmod_LightPunctualDataA and bbmod_LightPunctualDataB.
set_texture_offset Sets the bbmod_TextureOffset uniform to the given offset.
set_texture_scale Sets the bbmod_TextureScale uniform to the given scale.

See also

BBMOD_VertexFormat

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on November 16, 2022 using GMDoc.