32#include "standard.frag.hpp"
36 template <
typename Base = i_fragment_shader>
47 template <
typename Base = i_fragment_shader>
52 using base_type::add_in_variable;
53 using base_type::add_out_variable;
58 add_in_variable<vec3f>(
"Coord"_s, 0u);
59 auto& fragColor = add_in_variable<vec4f>(
"Color"_s, 1u);
60 add_in_variable<vec2f>(
"TexCoord"_s, 2u);
61 auto& fragFunction0 = add_in_variable<vec4f>(
"Function0"_s, 3u,
true);
62 auto& fragFunction1 = add_in_variable<vec4f>(
"Function1"_s, 4u,
true);
63 auto& fragFunction2 = add_in_variable<vec4f>(
"Function2"_s, 5u,
true);
64 auto& fragFunction3 = add_in_variable<vec4f>(
"Function3"_s, 6u,
true);
65 auto& fragFunction4 = add_in_variable<vec4f>(
"Function4"_s, 7u,
true);
66 add_out_variable<vec4f>(
"FragColor"_s, 0u).link(fragColor);
67 add_out_variable<vec4f>(
"FragFunction0"_s, 1u).link(fragFunction0);
68 add_out_variable<vec4f>(
"FragFunction1"_s, 2u).link(fragFunction1);
69 add_out_variable<vec4f>(
"FragFunction2"_s, 3u).link(fragFunction2);
70 add_out_variable<vec4f>(
"FragFunction3"_s, 4u).link(fragFunction3);
71 add_out_variable<vec4f>(
"FragFunction4"_s, 5u).link(fragFunction4);
76 return (aBufferType & (
91 aOutput +=
string{ glsl::StandardFragmentShader };
93 throw unsupported_shader_language();
193 void clear_stipple() final;
194 void set_stipple(
scalar aFactor, uint16_t aPattern,
scalar aPosition = 0.0) final;
215 void clear_shape() final;
fragment_shader(std::string const &aName)
virtual bool is_first_in_stage(const i_shader &aShader) const =0
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
void clear_filter() final
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
standard_filter_shader(std::string const &aName="standard_filter_shader")
bool supports(vertex_buffer_type aBufferType) const override
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
standard_fragment_shader(std::string const &aName="standard_fragment_shader")
bool supports(vertex_buffer_type aBufferType) const override
standard_glyph_shader(std::string const &aName="standard_glyph_shader")
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
standard_gradient_shader(std::string const &aName="standard_gradient_shader")
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
void set_gradient(i_rendering_context &aContext, const gradient &aGradient) final
void clear_gradient() final
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
standard_shape_shader(std::string const &aName="standard_shape_shader")
bool shape_active() const final
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
bool stipple_active() const final
standard_stipple_shader(std::string const &aName="standard_stipple_shader")
standard_texture_shader(std::string const &aName="standard_texture_shader")
void generate_code(const i_shader_program &aProgram, shader_language aLanguage, i_string &aOutput) const override
bool supports(vertex_buffer_type aBufferType) const override
void clear_texture() final
#define cache_shared_uniform(uniformName)
#define cache_uniform(uniformName)