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

Introduces a registerShader API to be able to add custom shaders to t… #861

Merged
merged 1 commit into from
Mar 3, 2016

Conversation

dmarcos
Copy link
Member

@dmarcos dmarcos commented Jan 19, 2016

…he material interface.

A custom shader schema mixes in into the material when applied.
Flat and standard register through the same API as the future 3rd party shaders.

I still have to cover all the glsl types for the uniforms but we can start reviewing to gain some time

@ngokevin
Copy link
Member

nice. allows the material component to truly be the core component while allowing people to add their own material features like refractions

@dmarcos dmarcos force-pushed the shaders branch 6 times, most recently from 66ee74c to 9c7c501 Compare January 21, 2016 00:56
@cvan cvan modified the milestone: 0.2.0 Jan 21, 2016
@cvan cvan mentioned this pull request Jan 21, 2016
@dmarcos dmarcos force-pushed the shaders branch 7 times, most recently from e4fa503 to b7f029e Compare January 25, 2016 07:05
schema: {
color: { default: '#FFF' , parse: parseColor },
fog: { default: true },
height: { default: 256 },
Copy link
Member

Choose a reason for hiding this comment

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

add type: 'int'

@dmarcos dmarcos force-pushed the shaders branch 4 times, most recently from ac5d4a2 to 12667d0 Compare February 2, 2016 19:37
@cvan cvan removed this from the 0.2.0 milestone Feb 5, 2016
*
* @param {object|null} oldData
*/
updateTexture: function (data) {
Copy link
Member

Choose a reason for hiding this comment

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

can this go outside the prototype?

@ngokevin ngokevin removed this from the 0.2.0 milestone Mar 2, 2016
@dmarcos dmarcos force-pushed the shaders branch 2 times, most recently from 943a880 to 58d2a33 Compare March 2, 2016 23:21
@dmarcos dmarcos force-pushed the shaders branch 5 times, most recently from 245c9a7 to 05d7df3 Compare March 3, 2016 00:31
Object.keys(propData).forEach(function (propName) {
if (!schema[propName]) {
throw new Error('Unknown component property: ' + propName);
warn('Unknown component property: ' + propName);
Copy link
Member

Choose a reason for hiding this comment

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

nice

@ngokevin
Copy link
Member

ngokevin commented Mar 3, 2016

r+wc

…he material interface.

A custom shader schema mixes in into the material when applied.
Flat and standard register through the same API as the future 3r party shaders.
dmarcos added a commit that referenced this pull request Mar 3, 2016
Introduces a registerShader API to be able to add custom shaders to t…
@dmarcos dmarcos merged commit bd27899 into aframevr:dev Mar 3, 2016
@ngokevin
Copy link
Member

ngokevin commented Mar 3, 2016

🌅 😎

@cvan
Copy link
Contributor

cvan commented Mar 3, 2016

imagers

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

Successfully merging this pull request may close these issues.

4 participants