MCPcopy Create free account
hub / github.com/DiligentGraphics/DiligentFX / ApplyTextureInputScale

Function ApplyTextureInputScale

Hydrogent/src/HnMaterial.cpp:187–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185
186template <typename T>
187static void ApplyTextureInputScale(const HnMaterialNetwork& Network, const pxr::TfToken& Name, T& Value)
188{
189 if (const HnMaterialParameter* TexParam = Network.GetParameter(HnMaterialParameter::ParamType::Texture, Name))
190 {
191 for (size_t i = 0; i < Value.GetComponentCount(); ++i)
192 Value[i] *= TexParam->InputScale[i];
193 }
194}
195
196static void ApplyTextureInputScale(const HnMaterialNetwork& Network, const pxr::TfToken& Name, float& Value)
197{

Callers 1

Calls 1

GetParameterMethod · 0.45

Tested by

no test coverage detected