Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in getting-started/3-improving #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions getting-started/3-improving.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void main() {
vec4 lightColor = texture(lightmap, lightCoord);

// Calculate our new fog color!
float fogValue = vertexPosition < fogEnd ? smoothstep(fogStart, fogEnd, vertexPosition) : 1.0;
float fogValue = vertexDistance < fogEnd ? smoothstep(fogStart, fogEnd, vertexDistance) : 1.0;

vec4 finalColor = texColor * lightColor * vertexColor;
pixelColor = vec4(mix(finalColor.xyz, fogColor, fogValue), finalColor.a);
Expand All @@ -65,4 +65,4 @@ void main() {

Note the use of the `mix` function, which mixes the first and second color based on the third value.

Once you reload, you should now see you have border fog!
Once you reload, you should now see you have border fog!