Skip to content

Commit

Permalink
[2D] - Corrected an issue with lighting shader not producing correct …
Browse files Browse the repository at this point in the history
…specular reflection color.
  • Loading branch information
Tape-Worm committed Dec 10, 2021
1 parent 5f991c1 commit f735f95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dependencies/BCnEncoder.NET
2 changes: 1 addition & 1 deletion Gorgon/Gorgon.Renderers/Gorgon2D/Resources/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ float3 PointLight(float3 color, float3 normal, GorgonSpriteLitVertex vertex, flo

if ((specularEnabled != 0) && (specularIntensity != 0))
{
result += color * GetSpecularValue(uv, normalize(vertex.worldPos - light.Position.xyz), normalize(normal), normalize(vertex.worldPos - _cameraPos.xyz), light.Attributes.x).rgb * specularIntensity;
result += GetSpecularValue(uv, normalize(vertex.worldPos - light.Position.xyz), normalize(normal), normalize(vertex.worldPos - _cameraPos.xyz), light.Attributes.x).rgb * specularIntensity;
}

float atten = 1.0f / (light.Attenuation.x + (distance * light.Attenuation.y) + (distance * distance * light.Attenuation.z));
Expand Down

0 comments on commit f735f95

Please sign in to comment.