Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
shaders_hlms.cpp File Reference
#include "components/rendering/rendering.h"
#include <string>
#include <OGRE/OgreRenderable.h>
#include <OGRE/OgreHlms.h>
#include <Strings/components/utils/uuid/uuid.h>
#include "api/v1/types/tags/classes/shader.h"
#include "components/diagnostics/logger/logger.h"
#include "components/core/tick/tick.h"
+ Include dependency graph for shaders_hlms.cpp:

Functions

std::string get_parameter_type_string (shader_parameter_type type)
 
int get_parameter_type_size (shader_parameter_type type)
 
int get_parameter_type_float_count (shader_parameter_type type)
 
std::string generate_instance_parameters (shader *program_tag, bool generate_for_const_buffer, bool generate_for_vertex_shader)
 
std::string generate_common_pieces (shader *program, bool generate_for_vertex_shader)
 
std::string generate_vertex_shader_pieces (shader *program)
 
std::string generate_pixel_shader_pieces (shader *program)
 

Variables

std::map< std::string, Ogre::HlmsDatablock * > shader_datablocks = std::map<std::string, Ogre::HlmsDatablock*>()
 
std::string shared_shader_pieces_template
 
std::string vertex_shader_pieces_template
 
std::string pixel_shader_pieces_template
 

Function Documentation

◆ generate_common_pieces()

std::string generate_common_pieces ( shader program,
bool  generate_for_vertex_shader 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate_instance_parameters()

std::string generate_instance_parameters ( shader program_tag,
bool  generate_for_const_buffer,
bool  generate_for_vertex_shader 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate_pixel_shader_pieces()

std::string generate_pixel_shader_pieces ( shader program)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate_vertex_shader_pieces()

std::string generate_vertex_shader_pieces ( shader program)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_parameter_type_float_count()

int get_parameter_type_float_count ( shader_parameter_type  type)
+ Here is the caller graph for this function:

◆ get_parameter_type_size()

int get_parameter_type_size ( shader_parameter_type  type)
+ Here is the caller graph for this function:

◆ get_parameter_type_string()

std::string get_parameter_type_string ( shader_parameter_type  type)
+ Here is the caller graph for this function:

Variable Documentation

◆ pixel_shader_pieces_template

std::string pixel_shader_pieces_template
Initial value:
= R"(
@property( blam_shader_has_instance_params )
@piece( custom_ps_posExecution )
outPs_colour0 = pixel(inPs, outPs_colour0);
@end
@end
@property( blam_shader_has_instance_params )
@piece( BlamitePixelShaderCode )
struct VS_INPUT {};
$CODE
@end
@end
)"

◆ shader_datablocks

std::map<std::string, Ogre::HlmsDatablock*> shader_datablocks = std::map<std::string, Ogre::HlmsDatablock*>()

◆ shared_shader_pieces_template

std::string shared_shader_pieces_template
Initial value:
= R"(
@property( blam_shader_has_instance_params )
@piece( custom_VStoPS )
$PARAMS
@end
@end
)"

◆ vertex_shader_pieces_template

std::string vertex_shader_pieces_template
Initial value:
= R"(
@property( blam_shader_has_instance_params )
@piece( custom_vs_posExecution )
$CBUF_MAPPING
outVs = vertex(input, outVs);
@end
@end
@property( blam_shader_has_instance_params )
@piece( custom_vs_uniformDeclaration )
CONST_BUFFER(blam_shader_instance_parameters, @value(blam_shader_instance_parameters_slot))
{
$PARAMS_BODY
};
@end
@end
@property( blam_shader_has_instance_params )
@piece( BlamiteVertexShaderCode )
$CODE
@end
@end
)"