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

Adding Lights #137

Closed
sandeeppster opened this issue Oct 4, 2013 · 5 comments
Closed

Adding Lights #137

sandeeppster opened this issue Oct 4, 2013 · 5 comments

Comments

@sandeeppster
Copy link

I am trying to add a directional light through shader, using following logic:
vLighting = ambientLight + (directionalLightColor * max(dot(normal.xyz, directionalVector), 0.0))

There is a (0,0,1) plane in my geometry.
Although this plane receives the light, but the light effect is only visible when the camera is approaching normal of the surface. If the camera "look at" is parallel to plane then the plane gets darker.

Can you please suggest if I need to add more to the code?

@fabrobinet
Copy link
Contributor

Your observation does not seem wrong to me.
So you may want to:

  • add more (directional or other type of) lights pointing in other direction.
  • use a different lighting model, because this is the simplest one.

FYI: We'll add in the converter the possibility to override the defaults shaders and probably better built in lighting models (for convenience).

@sandeeppster
Copy link
Author

Can we have working examples with light implemented in the scene itself? That would clear a lot of doubts.

@pjcozzi
Copy link
Member

pjcozzi commented Mar 6, 2014

Is this duplicate with #93?

@pjcozzi pjcozzi removed this from the Draft 1.0 spec milestone Apr 30, 2014
@pjcozzi
Copy link
Member

pjcozzi commented Apr 30, 2014

Can we close this as duplicate with #93?

@fabrobinet
Copy link
Contributor

yes I believe we can close this, the duck in the /model folder shows a light example. But as #93 lights are likely to be changed, so better tracking this consistently within #93.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants