Removed noperspective (not in GLSL ES 3.0), do not write smooth if not specified. Fixes #20435

This commit is contained in:
Juan Linietsky 2018-11-21 23:07:09 -03:00
parent 10c3ba2c1b
commit 631cf676c3
3 changed files with 1 additions and 9 deletions

View File

@ -133,8 +133,7 @@ static String _interpstr(SL::DataInterpolation p_interp) {
switch (p_interp) {
case SL::INTERPOLATION_FLAT: return "flat ";
case SL::INTERPOLATION_NO_PERSPECTIVE: return "noperspective ";
case SL::INTERPOLATION_SMOOTH: return "smooth ";
case SL::INTERPOLATION_SMOOTH: return "";
}
return "";
}

View File

@ -131,7 +131,6 @@ const char *ShaderLanguage::token_names[TK_MAX] = {
"TYPE_USAMPLER3D",
"TYPE_SAMPLERCUBE",
"INTERPOLATION_FLAT",
"INTERPOLATION_NO_PERSPECTIVE",
"INTERPOLATION_SMOOTH",
"PRECISION_LOW",
"PRECISION_MID",
@ -271,7 +270,6 @@ const ShaderLanguage::KeyWord ShaderLanguage::keyword_list[] = {
{ TK_TYPE_USAMPLER3D, "usampler3D" },
{ TK_TYPE_SAMPLERCUBE, "samplerCube" },
{ TK_INTERPOLATION_FLAT, "flat" },
{ TK_INTERPOLATION_NO_PERSPECTIVE, "noperspective" },
{ TK_INTERPOLATION_SMOOTH, "smooth" },
{ TK_PRECISION_LOW, "lowp" },
{ TK_PRECISION_MID, "mediump" },
@ -759,7 +757,6 @@ bool ShaderLanguage::is_token_interpolation(TokenType p_type) {
return (
p_type == TK_INTERPOLATION_FLAT ||
p_type == TK_INTERPOLATION_NO_PERSPECTIVE ||
p_type == TK_INTERPOLATION_SMOOTH);
}
@ -767,8 +764,6 @@ ShaderLanguage::DataInterpolation ShaderLanguage::get_token_interpolation(TokenT
if (p_type == TK_INTERPOLATION_FLAT)
return INTERPOLATION_FLAT;
else if (p_type == TK_INTERPOLATION_NO_PERSPECTIVE)
return INTERPOLATION_NO_PERSPECTIVE;
else
return INTERPOLATION_SMOOTH;
}

View File

@ -80,7 +80,6 @@ public:
TK_TYPE_USAMPLER3D,
TK_TYPE_SAMPLERCUBE,
TK_INTERPOLATION_FLAT,
TK_INTERPOLATION_NO_PERSPECTIVE,
TK_INTERPOLATION_SMOOTH,
TK_PRECISION_LOW,
TK_PRECISION_MID,
@ -210,7 +209,6 @@ public:
enum DataInterpolation {
INTERPOLATION_FLAT,
INTERPOLATION_NO_PERSPECTIVE,
INTERPOLATION_SMOOTH,
};