68 info.
define(
"USE_SHADER_TO_RGBA");
71 !is_point_cloud && !is_background) {
72 info.
define(
"USE_BARYCENTRICS");
76 info.
define(
"USE_BARYCENTRICS");
79 std::stringstream attr_load;
81 const bool do_fragment_attrib_load = is_background || is_volume;
94 attr_load <<
"struct " << iface.
name <<
" {\n";
95 for (
const auto &inout : iface.
inouts) {
96 attr_load <<
" " << inout.type <<
" " << inout.name <<
";\n";
103 attr_load << in.
type <<
" " << in.
name <<
";\n";
126 info.
define(
"EEVEE_GENERATED_INTERFACE");
130 attr_load <<
"void attrib_load()\n";
133 attr_load <<
"}\n\n";
135 std::stringstream vert_gen, frag_gen, geom_gen;
137 if (do_fragment_attrib_load) {
138 frag_gen << attr_load.str();
141 vert_gen << attr_load.str();
148 info.
vertex_source(is_volume ?
"eevee_empty_volume.glsl" :
"eevee_empty.glsl");
156 frag_gen <<
"Closure nodetree_exec()\n";
159 frag_gen << ((codegen.
volume) ? codegen.
volume :
"return CLOSURE_DEFAULT;\n");
162 frag_gen << ((codegen.
surface) ? codegen.
surface :
"return CLOSURE_DEFAULT;\n");
167 info.
define(
"EEVEE_DISPLACEMENT_BUMP");
169 frag_gen <<
"vec3 displacement_exec()\n";
177 info.
fragment_source(is_volume ?
"eevee_empty_volume.glsl" :
"eevee_empty.glsl");
uint64_t GPU_material_uuid_get(GPUMaterial *mat)
bool GPU_material_flag_get(const GPUMaterial *mat, eGPUMaterialFlag flag)
@ GPU_MATFLAG_SHADER_TO_RGBA
@ GPU_MATFLAG_OBJECT_INFO
@ GPU_MATFLAG_BARYCENTRIC
CCL_NAMESPACE_BEGIN struct Options options
ccl_global KernelShaderEvalInput * input
unsigned __int64 uint64_t
char * material_functions
GPUShaderCreateInfo * create_info
Describe inputs & outputs, stage interfaces, resources and sources of a shader. If all data is correc...
Self & auto_resource_location(bool value)
Vector< StageInterfaceInfo * > vertex_out_interfaces_
Self & sampler(int slot, ImageType type, StringRefNull name, Frequency freq=Frequency::PASS, eGPUSamplerState sampler=(eGPUSamplerState) -1)
std::string fragment_source_generated
Self & geometry_source(StringRefNull filename)
Vector< VertIn > vertex_inputs_
Self & fragment_source(StringRefNull filename)
Self & builtins(BuiltinBits builtin)
Self & additional_info(StringRefNull info_name0, StringRefNull info_name1="", StringRefNull info_name2="", StringRefNull info_name3="", StringRefNull info_name4="", StringRefNull info_name5="", StringRefNull info_name6="")
std::string vertex_source_generated
std::string typedef_source_generated
Self & vertex_out(StageInterfaceInfo &interface)
Self & legacy_resource_location(bool value)
Self & define(StringRefNull name, StringRefNull value="")
Self & vertex_source(StringRefNull filename)
std::string geometry_source_generated
Self & geometry_layout(PrimitiveIn prim_in, PrimitiveOut prim_out, int max_vertices, int invocations=-1)
StringRefNull instance_name
Self & smooth(Type type, StringRefNull _name)
Self & flat(Type type, StringRefNull _name)