26-08-2021, 01:35 PM
(This post was last modified: 26-08-2021, 01:36 PM by josemendez.)
(26-08-2021, 09:29 AM)Nyxtra Wrote: Hi!
I'm using ObiRopeLineRenderer to render my rope. In certain places on the rope its halves need to be different colors, I am attaching a picture with an example.
To do this i assign colors in the solver array, and in alpha channel I specify which half should be colored. When mesh is updated in renderer I then assign vertex colors according to alpha.
This works mostly fine, except for cases when half that needs to be colored changes, like in the picture. When two neighboring vertices have the same color, there is a line across that is brigther than sides by themselves.
Is there any way I could avoid this? Maybe make this line less bright?
Appreciate any advice!
Hi there!
This can’t really be avoided: at points where curvature changes sign or the side you’re coloring changes, vertex color interpolation will result in the brighter line you see across. It’s just how rendering works: vertex data is interpolated to fragments. You might get lucky by disabling interpolation for color in your vertex shader, using interpolation qualifiers:
https://stackoverflow.com/questions/1387...hader?rq=1