ULRE/src/ShaderGen/ShaderCreateInfoFragment.cpp

31 lines
727 B
C++
Raw Normal View History

2024-06-18 02:04:11 +08:00
#include<hgl/shadergen/ShaderCreateInfoFragment.h>
2023-03-17 10:14:07 +08:00
#include<hgl/shadergen/ShaderDescriptorInfo.h>
2023-03-06 14:06:20 +08:00
2023-03-21 18:05:48 +08:00
namespace hgl{namespace graph{
2023-03-06 14:06:20 +08:00
using namespace hgl::graph;
2023-03-17 10:08:41 +08:00
bool ShaderCreateInfoFragment::ProcOutput()
{
2024-06-18 02:04:11 +08:00
const auto &output_list=sdi->GetShaderStageIO().output;
2024-06-18 02:04:11 +08:00
const VertexInputAttribute *o=output_list.items;
2023-06-02 20:45:19 +08:00
final_shader+="\n";
2023-03-17 21:06:05 +08:00
for(uint i=0;i<output_list.count;i++)
{
final_shader+="layout(location=";
final_shader+=AnsiString::numberOf(i);
final_shader+=") out ";
2023-03-17 21:06:05 +08:00
final_shader+=GetShaderAttributeTypename(o);
final_shader+=" ";
2023-03-17 21:06:05 +08:00
final_shader+=o->name;
final_shader+=";\n";
++o;
}
return(true);
}
2023-03-21 18:05:48 +08:00
}}//namespace hgl::graph