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

WindDemo: Rename uniforms #1288

Merged
merged 4 commits into from
Jan 5, 2018
Merged

WindDemo: Rename uniforms #1288

merged 4 commits into from
Jan 5, 2018

Conversation

1chandu
Copy link
Contributor

@1chandu 1chandu commented Jan 4, 2018

  • Fixes Wind demo regressions #1286
  • Create fragment shader versions of fp32, project and lighting shader modules.
  • Remove duplicated shader code from delaunay-cover and wind layer and use above shader modules.

Verified running wind demo.

Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we copying the entire project module.
Why not just import the project module and override any specific function that needs to be overridden?
That would seem like a great simplification of the shader code here.

@1chandu
Copy link
Contributor Author

1chandu commented Jan 4, 2018

@ibgreen , its doing per-fragment lighting, so needed project methods in fragment shader. When we support per-fragment lighting in lighting shader module this can be simplified.

@@ -0,0 +1,159 @@
// NOTE: this is same as luma.gl 'fp32' module except this is applied to fragment shader.
const fsfp32shader = `\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe no need to copy the text? Can't we just import the luma.gl module and just create a new javascript object
export default {fs: vsmodule.vs}
?

@1chandu 1chandu merged commit 554821f into master Jan 5, 2018
@1chandu 1chandu deleted the wind_renameUniforms branch January 5, 2018 16:37
1chandu added a commit that referenced this pull request Jan 6, 2018
* WindDemo:  Create and FS versions of  fp32, project and lighting modules and remove duplicate shader code from layers.
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

Successfully merging this pull request may close these issues.

3 participants