2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-03 07:55:52 +00:00

Fix GLSL reflection shader compile errors.

This commit is contained in:
Phillip Stephens 2017-05-28 23:00:17 -07:00
parent ade1011dbc
commit 145c152012

View File

@ -137,12 +137,12 @@ std::string GLSL::GenerateReflectionExpr(ReflectionType type) const
{ {
case ReflectionType::None: case ReflectionType::None:
default: default:
return "vec3(0.0, 0.0, 0.0);\n"; return "vec3(0.0, 0.0, 0.0)";
case ReflectionType::Simple: case ReflectionType::Simple:
return "texture(reflectionTex, vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha;\n"; return "texture(reflectionTex, vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha";
case ReflectionType::Indirect: case ReflectionType::Indirect:
return "texture(reflectionTex, (texture(reflectionIndTex, vtf.reflectTcgs[0]).rg - " return "texture(reflectionTex, (texture(reflectionIndTex, vtf.reflectTcgs[0]).rg - "
"vec2(0.5, 0.5)) * vec2(0.5, 0.5) + vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha;\n"; "vec2(0.5, 0.5)) * vec2(0.5, 0.5) + vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha";
} }
} }