MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / lerp

Method lerp

src/OpenColorIO/GpuShaderUtils.cpp:1113–1145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111}
1112
1113std::string GpuShaderText::lerp(const std::string & x,
1114 const std::string & y,
1115 const std::string & a) const
1116{
1117 std::ostringstream kw;
1118 switch (m_lang)
1119 {
1120 case LANGUAGE_OSL_1:
1121 case GPU_LANGUAGE_GLSL_1_2:
1122 case GPU_LANGUAGE_GLSL_1_3:
1123 case GPU_LANGUAGE_GLSL_4_0:
1124 case GPU_LANGUAGE_GLSL_VK_4_6:
1125 case GPU_LANGUAGE_GLSL_ES_1_0:
1126 case GPU_LANGUAGE_GLSL_ES_3_0:
1127 case GPU_LANGUAGE_MSL_2_0:
1128 {
1129 kw << "mix(" << x << ", " << y << ", " << a << ")";
1130 break;
1131 }
1132 case GPU_LANGUAGE_CG:
1133 case GPU_LANGUAGE_HLSL_SM_5_0:
1134 {
1135 kw << "lerp(" << x << ", " << y << ", " << a << ")";
1136 break;
1137 }
1138
1139 default:
1140 {
1141 throw Exception("Unknown GPU shader language.");
1142 }
1143 }
1144 return kw.str();
1145}
1146
1147std::string GpuShaderText::float3GreaterThan(const std::string & a,
1148 const std::string & b) const

Callers 11

GetCDLGPUShaderProgramFunction · 0.80
Add_hue_weight_shaderFunction · 0.80
Add_Glow_03_Fwd_ShaderFunction · 0.80
Add_Glow_03_Inv_ShaderFunction · 0.80
_Add_Reach_tableFunction · 0.80
_Add_Cusp_tableFunction · 0.80
_Add_Focus_Gain_funcFunction · 0.80
_Add_Compress_Gamut_funcFunction · 0.80
Add_XYZ_TO_LUVFunction · 0.80
Add_LUV_TO_XYZFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected