Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Book 3.5.3 and later: Are the subscripts $i$ and $o$ used inconsistently? #1712

Open
@Xlucidator

Description

Image

In the current context, $\textrm{Color}_i$ represents the result traced from the light side via ray_color(scattered, ...) , meaning the subscript $i$ denotes the incoming direction toward the surface from the light. This usage is consistent with the standard convention in ray tracing.

 double scattering_pdf(const ray& r_in, const hit_record& rec, const ray& scattered)
 const override {
 auto cos_theta = dot(rec.normal, unit_vector(scattered.direction()));
 return cos_theta < 0 ? 0 : cos_theta/pi;
 }

However, from the context and code, it seems that $\theta_o$ actually represents the cosine between the surface normal and the scattered ray pointing toward the light. This implies that the subscript $o$ corresponds to the same light-side direction as $i$ in $\textrm{Color}_i$, which can be quite confusing.

Am I understanding this correctly? Should the notation be revised for clarity?

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

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /