shader: Add PointCoord attribute

This commit is contained in:
FernandoS27 2021-03-29 20:05:38 +02:00 committed by ameerj
parent b7589fe115
commit 9d7422d967
5 changed files with 16 additions and 0 deletions

View file

@ -425,6 +425,9 @@ void EmitContext::DefineInputs(const Info& info) {
if (info.loads_front_face) {
front_face = DefineInput(*this, U1, spv::BuiltIn::FrontFacing);
}
if (info.loads_point_coord) {
point_coord = DefineInput(*this, F32[2], spv::BuiltIn::PointCoord);
}
for (size_t index = 0; index < info.input_generics.size(); ++index) {
const InputVarying generic{info.input_generics[index]};
if (!generic.used) {