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

Should we upload rest colors #102

Open
jw4149 opened this issue Nov 10, 2018 · 3 comments
Open

Should we upload rest colors #102

jw4149 opened this issue Nov 10, 2018 · 3 comments

Comments

@jw4149
Copy link

jw4149 commented Nov 10, 2018

Dear Professor,
When firstly uploading the vertex attributes, should we upload the colors of the initial state along with positions and normals of the initial state ?
If so, how do we recalculate the colors later on the GPU side ? as it depends on normals, which changes according to translations and rotations.
Thank you.

@danielepanozzo
Copy link
Owner

If you want to specify different colors for the different objects yes, you should send an additional color attribute for each vertex. The shading of every fragment (which depends on the transformed normals and positions) should be computed in the fragments shader.

@jw4149
Copy link
Author

jw4149 commented Nov 10, 2018

Thank you professor. Another question, is using element buffer a must in this assignment ? Is it better to keep multiple copies of each vertex in the vertex array ?

@danielepanozzo
Copy link
Owner

No it is not required to use an element buffer in this assignment.

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