I’m following along a shader implementation of a certain specular calculation. Here’s the function:

inline float3 ComputeSpecular( … )

{

float F, D, G;

```
// ---- Calculation of F, D, and G ----
// Calculates the specular as a scalar value
float specular = NdotL * D * F * G;
// But it returns a vector value
return specular;
```

}

So it returns a scalar in a vector-returning function. So what will the output look like? Will it simply be a vector of repeating values?,I’m following an implementation of a custom specular shader in Unity. It sort of goes like this:

```
inline float3 ComputeSpecular( ... )
{
float F, D, G;
// ---- Calculation of F, D, and G ----
// Calculates the specular as a scalar value
float specular = NdotL * D * F * G;
// But it returns a vector value
return specular;
}
```

So when we assign a scalar as the return value for a vector-calculating function, what does the actual output look like? Is it a simple vector with repeating values?