From 529fd09a7a621209f71efbe515ea737b21a842a4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 4 Jan 2024 20:00:55 +0200 Subject: [PATCH] Use the flat qualifier on both sides of a geneated interface --- source/glsl/generate.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index 4fb2d7f3..20363a23 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -163,11 +163,10 @@ VariableDeclaration *InterfaceGenerator::generate_interface(VariableDeclaration unique_ptr var = make_unique(); var->sampling = other_var.sampling; - if(stage->type==Stage::FRAGMENT && iface=="in") - if(BasicTypeDeclaration *basic = dynamic_cast(other_var.type_declaration)) - if(BasicTypeDeclaration *elem = get_element_type(*basic)) - if(elem->kind==BasicTypeDeclaration::INT) - var->interpolation = "flat"; + if(BasicTypeDeclaration *basic = dynamic_cast(other_var.type_declaration)) + if(BasicTypeDeclaration *elem = get_element_type(*basic)) + if(elem->kind==BasicTypeDeclaration::INT) + var->interpolation = "flat"; var->interface = iface; var->type = other_var.type; var->name = name; -- 2.45.2