Standardize the MeshLineMaterial, support fog and logarithmicDepthBuffer. #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a MINOR update !
I rewrote the structure of the
MeshLineMaterial
to standardize it closer to the others Three.Js materials but in avoid any breaking changes.I confirm that did not change any props or the current shaders core too.
I just took advantage of this rewrote to add the support of the fog and the logarithmicDepthBuffer.
Details:
I directly made it herited to a
ShaderMaterial
instead of aMaterial
who returning aRawShaderMaterial
. That allow to have the material properties dynamic and fix some user's issues who use them directly (MeshLineMaterial() quietly modifies the parameters object passed to it #70, Keep MeshLineMaterial from modifying parameters passed to it #71, Update color dynamically possible of MeshLine? #67).I updated the
RawShaderMaterial
to aShaderMaterial
to be more generic and enable the usage of the WebGLProgram. The material can now detect automatically some rendering parameters.I included the
logdepthbuf_pars
&fog_pars
to fix Depth Issue #65, Effected by fog #48 and Support for the current fog shaders in THREE #32 thank to the previous point. It should be easier to also include other supports like thetonemapping_pars
.