Hi, I have a little shader written for basic lighting, I just rewrote the example from LearnOpenGL to hlsl but I can't render the red color at all. Thank you for all your responses.
float4 MainPS(VertexShaderOutput input) : SV_Target {
float3 ambientLightColor = float3(1.0, 1.0, 1.0);
float3 diffuseLightColor = float3(1.0, 1.0, 1.0);
float3 specularLightColor = float3(1.0, 1.0, 1.0);
// ambient
float ambientStrength = 0.1;
float3 ambient = ambientLightColor * ambientStrength;
// diffuse
float3 lightDir = normalize(pointLight - input.Position);
float diff = max(dot(input.Normal.xyz, lightDir), 0.0);
float3 diffuse = diff * diffuseLightColor;
// specular
float specularStrength = 0.4;
float3 viewDir = normalize(cameraSource - input.Position);
float3 reflectDir = reflect(-lightDir, input.Normal.xyz);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), 64);
float3 specular = specularStrength * spec * specularLightColor;
// output
float3 outputColor = (ambient + diffuse + specular) * input.Color.rgb;
return float4(outputColor, 1.0);
}