From: Mikko Rasa Date: Thu, 4 Jan 2024 18:00:55 +0000 (+0200) Subject: Use the flat qualifier on both sides of a geneated interface X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=529fd09a7a621209f71efbe515ea737b21a842a4;p=libs%2Fgl.git Use the flat qualifier on both sides of a geneated interface --- 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;