This commit is contained in:
Jack Andersen 2017-05-29 09:54:06 -10:00
commit f4bc6d74df
3 changed files with 9 additions and 9 deletions

View File

@ -137,12 +137,12 @@ std::string GLSL::GenerateReflectionExpr(ReflectionType type) const
{
case ReflectionType::None:
default:
return "vec3(0.0, 0.0, 0.0);\n";
return "vec3(0.0, 0.0, 0.0)";
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:
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";
}
}

View File

@ -130,12 +130,12 @@ std::string HLSL::GenerateReflectionExpr(ReflectionType type) const
{
case ReflectionType::None:
default:
return "float3(0.0, 0.0, 0.0);\n";
return "float3(0.0, 0.0, 0.0)";
case ReflectionType::Simple:
return "reflectionTex.Sample(samp, vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha;\n";
return "reflectionTex.Sample(samp, vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha";
case ReflectionType::Indirect:
return "reflectionTex.Sample(samp, (reflectionIndTex.Sample(samp, vtf.reflectTcgs[0]).rg - "
"float2(0.5, 0.5)) * float2(0.5, 0.5) + vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha;\n";
"float2(0.5, 0.5)) * float2(0.5, 0.5) + vtf.reflectTcgs[1]).rgb * vtf.reflectAlpha";
}
}

View File

@ -135,12 +135,12 @@ std::string Metal::GenerateReflectionExpr(ReflectionType type) const
{
case ReflectionType::None:
default:
return "float3(0.0, 0.0, 0.0);\n";
return "float3(0.0, 0.0, 0.0)";
case ReflectionType::Simple:
return "reflectionTex.sample(samp, vtf.reflectTcgs1).rgb * vtf.reflectAlpha;\n";
return "reflectionTex.sample(samp, vtf.reflectTcgs1).rgb * vtf.reflectAlpha";
case ReflectionType::Indirect:
return "reflectionTex.sample(samp, (reflectionIndTex.sample(samp, vtf.reflectTcgs0).rg - "
"float2(0.5, 0.5)) * float2(0.5, 0.5) + vtf.reflectTcgs1).rgb * vtf.reflectAlpha;\n";
"float2(0.5, 0.5)) * float2(0.5, 0.5) + vtf.reflectTcgs1).rgb * vtf.reflectAlpha";
}
}