-
-
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
Enable raw shader code for ShaderMaterial #3121
Comments
Maybe |
Sounds good too. Although the difference between |
+1 to this functionality. this is an issue I've also faced. I think mrdoob is coming from where a new material is easier API-wise compared to a flag. Or perhaps let Although I always wonder if there's a better way three.js can generate configurable shader code.. |
+1 for me too |
upping this thread, since i'm playing around with shaders a little.. any recent thoughts to this? |
Haven't spend any brain cycles into this myself. Open to more API ideas though. |
The simplest solution for now would be as @BKcore says - check for a flag. Then if we wish to try the I should probably try to do this soon and see whats happens. |
Well... that took a while... |
nice @mrdoob. i was thinking of this the other day I was looking at |
Step by step... Next thing is, maybe, to do a |
I'm suggesting a quick addition to THREE.WebGLRenderer.buildProgram() and THREE.ShaderMaterial in 2 steps:
This really tiny change would allow true custom fragment and vertex shaders to be used, without the fear of some automatic and hidden attributes/uniforms/defines addition by the Renderer.
As for backward compatibility, it's not a problem since we could just set disableShaderPrefix to false by default, making that change a choice to the user by setting that attribute to true after creating the material.
Sometimes, I need true flexibility when writing custom materials, and with all the code added by the Renderer to my shaders, it's sometimes a pain to debug.
What do you think?
The text was updated successfully, but these errors were encountered: