Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7981133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:16:54+00:00 2026-06-04T10:16:54+00:00

I am using a simple form of Phong Shading Model where the scene is

  • 0

I am using a simple form of Phong Shading Model where the scene is lit by a directional light shining in the direction -y, with monochromatic light of intensity 1. The viewpoint is infinitely far away, looking along the direction given by the vector (-1, 0, -1).

In this case, the shading equation is given by

I = k_d*L(N dot L)+k_s*L(R dot V)^n_s

where L is the Directional Light source, kd, ks both are 0.5 and n_s = 50

In this case, how can I compute the R vector?

I am confused because for computing finite vectors we need finite coordinates. In case of the Directional Light, it’s infinitely far away in the -y direction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:16:56+00:00Added an answer on June 4, 2026 at 10:16 am

    Reflect vector can be calculated by using reflect function from GLSL.

    vec3 toEye = normalize(vec3(0.0) - vVaryingPos);    
    vec3 lightRef = normalize(reflect(-light, normal)); 
    float spec = pow(dot(lightRef, toEye), 64.0f);  
    specularColor = vec3(1.0)*max(spec, 0.0); 
    

    calculations are done in eye space… so the eyePos is in vec3(0.0)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started using Simple-form and Bootstrap and I have tried to follow this
I'm using a simple web form and some PHP script to send the completed
I have installed VS2010 and MVC2 and testing a simple form using tinyMCE. When
Here is a simple form I am using to send XML data in admin_xml.php
Im using regular asp.net c# (webforms) i need to build a simple form that
I have started using jQuery and rails. I have made a simple form that
Using Ruby 1.8.7-p358, Rails 3.0.12, gem responder, gem simple-form; jquery_ujs.js I have a form
i am using a simple form page with 4 steps in it i am
I've created a simple contact form using the modelformset_factory to build the form in
I'm using a simple registration form for CakePHP. This is my edit view: <h2>Add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.