-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Insert glsl inside material shaders [phong, lambert, standard, ...] #11562
Labels
Comments
Isn't this the same as #11475? |
@mrdoob lol, haven't seen it yet. Same idea:D, different concept |
@mrdoob |
Lets move the conversation there then 🙂 |
@mrdoob Okay, I'll post my concept to that issue. Feel free to close this one now as it is a duplicate. |
3 tasks
This was referenced Jun 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just an idea that I would love to see in three.js. Let's say I want to slightly edit
MeshPhongMaterial
and apply that changes.What I need to do now:
vertexShader
&fragmentShader
in ShaderChunk. Find thisfragmentShader
into my shader.vertexShader
uniforms
in ShaderLib. like thisShaderMaterial
and apply those uniforms, vertexShader & fragmentShader...map
: I need to defineUSE_MAP
for my new shader material.Those things require copying/modifying existing
.glsl
, copying and filling uniforms and finally setting such uncommon things (6, 7).And my question is what if we could make this process less complex? How about making "key" parts in shaders (those which we often modify/add something). And a way to fill them with some other glsl through material constructor like this or just make those chunks replacable:
Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: