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

Per-pixel lighting for shaders #233

Open
dylanede opened this issue Sep 25, 2019 · 1 comment
Open

Per-pixel lighting for shaders #233

dylanede opened this issue Sep 25, 2019 · 1 comment

Comments

@dylanede
Copy link

The Lambert and Phong shaders calculate lighting per-vertex. This results in poor lighting for meshes with low vertex density. There really is no need for this on modern hardware.

@kvark
Copy link
Collaborator

kvark commented Sep 25, 2019

This is not true. Phong shaders are evaluating lighting on per-pixel basis:

float dot_nl = dot(normal, normalize(dir));

Is there a particular quality issue you are concerned about? Or just sharing the observation?

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

2 participants