Skip to content

3-improving.md中的vertexPosition没有申明,4-directional-lighting.md中的Enhanced directional lighting中的代码块存在语法问题 #19

Closed
@Pycnocline

Description

@Pycnocline

getting-started中可能存在两个问题:

1.在3-improving.md文件中的Back to the Fragment shader (again)部分存在以下代码:

float fogValue = vertexPosition < fogEnd ? smoothstep(fogStart, fogEnd, vertexPosition) : 1.0;

此代码中的vertexPosition没有在上下文中提及且没有声明,推测应该为vertexDistance

2.在4-directional-lighting.md中的Enhanced directional lighting部分存在以下代码:

float NdotL = max(0.2, dot(normal, normalize(shadowLightPosition));

此代码中缺少一个')'

Activity

WGrav01

WGrav01 commented on Aug 28, 2024

@WGrav01

Translated to English:

There are two possible problems in getting-started:

  1. The following code exists in the Back to the Fragment shader (again) section of the 3-improving.md file:

float fogValue = vertexPosition < fogEnd ? smoothstep(fogStart, fogEnd, vertexPosition) : 1.0;

The vertexPosition in this code is not mentioned in the context and is not declared, presumably it should be vertexDistance.

  1. The following code exists in the Enhanced directional lighting section of 4-directional-lighting.md:

float NdotL = max(0.2, dot(normal, normalize(shadowLightPosition));

This code is missing a single ')'.

WGrav01

WGrav01 commented on Aug 28, 2024

@WGrav01

The first error was fixed in PR #18, I'll open another PR to fix the second issue. (Fixed in #20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @WGrav01@Pycnocline

        Issue actions

          3-improving.md中的vertexPosition没有申明,4-directional-lighting.md中的Enhanced directional lighting中的代码块存在语法问题 · Issue #19 · IrisShaders/ShaderDoc