fixed a bug in ShaderCreateInfoVertex.cpp, put "C-style string" in function that it's a bug.
This commit is contained in:
parent
5ba3c1790d
commit
2ce36ec26c
@ -59,7 +59,7 @@ private:
|
||||
pgci.grid_size.Set(32,32);
|
||||
pgci.sub_count.Set(8,8);
|
||||
|
||||
pgci.lum=0.5;
|
||||
pgci.lum=0.75;
|
||||
pgci.sub_lum=1.0;
|
||||
|
||||
prim_plane_grid=CreatePlaneGrid(db,material->GetDefaultVIL(),&pgci);
|
||||
|
@ -80,7 +80,6 @@ public:
|
||||
int AddOutput(const AnsiString &type,const AnsiString &name,Interpolation inter=Interpolation::Smooth);
|
||||
|
||||
void AddFunction(const char *str){function_list.Add(str);}
|
||||
void AddFunction(const AnsiString *str){function_list.Add(str->c_str());}
|
||||
|
||||
void SetMaterialInstance(UBODescriptor *,const AnsiString &);
|
||||
void AddMaterialInstanceOutput();
|
||||
|
@ -43,6 +43,11 @@ void ShaderCreateInfoVertex::AddJoint()
|
||||
AddInput(VAT_VEC4, VAN::JointWeight,VK_VERTEX_INPUT_RATE_VERTEX,VertexInputGroup::JointWeight);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr const char MF_GetLocalToWorld[]="\nmat4 GetLocalToWorld(){return l2w.mats[Assign.x];}\n";
|
||||
}
|
||||
|
||||
void ShaderCreateInfoVertex::AddAssign()
|
||||
{
|
||||
AddInput( ASSIGN_VAT_FMT,
|
||||
@ -50,8 +55,6 @@ void ShaderCreateInfoVertex::AddAssign()
|
||||
VK_VERTEX_INPUT_RATE_INSTANCE,
|
||||
VertexInputGroup::Assign);
|
||||
|
||||
constexpr const char MF_GetLocalToWorld[]="\nmat4 GetLocalToWorld(){return l2w.mats[Assign.x];}\n";
|
||||
|
||||
AddFunction(MF_GetLocalToWorld);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user