Add missing Toon Material and shader files #10176

Merged
merged 2 commits into from Nov 20, 2016

Projects

None yet

3 participants

@takahirox
Contributor

See #9912

src/materials/MeshToonMaterial.js
+
+}
+
+MeshToonMaterial.prototype = Object.create( Material.prototype );
@mrdoob
mrdoob Nov 20, 2016 Owner

You can probably make it extend MeshPhongMaterial instead and save a lot of code.

@takahirox
Contributor

Thanks for the advice! I've updated!

@mrdoob mrdoob merged commit bc3bfab into mrdoob:dev Nov 20, 2016
@mrdoob
Owner
mrdoob commented Nov 20, 2016

Thanks!

@takahirox takahirox deleted the takahirox:MissingToonShaderFiles branch Nov 20, 2016
@WestLangley
Collaborator

You can probably make it extend MeshPhongMaterial instead and save a lot of code.

Are all the Phong parameters appropriate, or should it extend Material?

If all the Phong parameters are appropriate, then you only need to document the new params at the top of the file; use MeshPhysicalMaterial.js as a reference.

If all the Phong parameters are appropriate, then you are duplicating a lot of glsl code. That can likely be improved. We can cross that bridge later...

Do you mind adding MeshToonMaterial.html in the docs? We are trying to be disciplined, now. :-)

Thanks!

@takahirox
Contributor

Thanks for the comment. I will!

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