-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
Custom blending states reset between rendered frames #9564
Comments
Do you mind creating a jsfiddle we can work with? |
Have just bumped into this problem myself. I've taken a stab at a fix by adding the state reset logic to the conditional at the start of the
This has resolved the issue for me, although I'm unclear if this may have had unintended side effects (haven't come across any, knock on wood). |
fallenoak
added a commit
to fallenoak/three.js
that referenced
this issue
Oct 10, 2016
mrdoob
pushed a commit
that referenced
this issue
Oct 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the problem
I've got a
ShaderMaterial
withCustomBlending
. Drawing this on screen on the first frame works as expected. However on subsequent frames the blending resets back to something similar toNormalBlending
.The issue seems to be in
setBlending(...)
of WebGLState.js.Looking at the source code of the function it seems like it won't handle
CustomBlending
-NoBlending
-CustomBlending
sequence correctly.Below is a crude outline of the function with the faulty logic highlighted in the comments:
I was unable to get the master branch working in my environment most likely due to #9489. (JSPM imports three.js as
undefined
with master branch).However I did check the source code and the only changes that affect the above function seem to be related to the module refactoring so I'm fairly confident this issue affects r80 as well.
I switched my code to
AdditiveBlending
as a workaround which works just fine for my use case.Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: