kovacsv / JSModeler

A JavaScript framework to create and visualize 3D models.
MIT License
648 stars 124 forks source link

GenerateWireBody rendering broken #22

Closed shiruken1 closed 7 years ago

shiruken1 commented 7 years ago

Hello again!

Just to give you a head's up, as of Firefox v50.1.0 and Chrome v55.0.2883.87, GenerateWireBody is having rendering problems. I would assume something in their latest implementation of WebGL changed, so as to impact the Line shader script.

When I run your fiddle, I get this output

All the best, and thanks in advance for any help!

shiruken1 commented 7 years ago

sandbox/linesandpoints.html illustrates this better.

kovacsv commented 7 years ago

Hello,

It is strange, it works for me, What operating system do you use?

I crated the same example with the internal, and the three.js based viewer. Does it work for you? http://jsfiddle.net/yunq4tys/1/

Viktor

shiruken1 commented 7 years ago

Nope. I get the same thing like in sandbox/linesandpoints.html:

http://www.awesomescreenshot.com/image/2136715/26d713d9ddd01a6e3e2a9995c327aa0a

I'm running Ubuntu 16.04 on both my desktop and laptop, as well as a friend's desktop, all showing the same glitch.

Thank you so much for the help!

kovacsv commented 7 years ago

It seems that the problem appears only with the internal viewer. As a workaround you can use the three.js based viewer. It has the same functionality but uses three.js to show models.

shiruken1 commented 7 years ago

FWIW, Win10 running Chrome55.0.2883.87 and FF51.0.1 renders grids perfectly, so your initial hunch of it being an OS issue seems to be correct.

shiruken1 commented 7 years ago

I've been able to fix this issue by initializing the diffuseComponent to vec3(0.0) in the point and line fragment shader script. Let me know if that works on other OS/browsers.

kovacsv commented 7 years ago

Good catch, thank you very much. It works on windows, too. I commited the change to development branch!