1

I've come against a really bizarre shader error in many of the particle examples for Three.js. In the latest Chrome and Firefox in OSX 10.7, gl_PointCoord returns (1,0) for every single fragment. This is found in a few of the included examples as well. Specifically, the Particle Billboards example, the Particle Billboard colors example, and the Particle Sprites examples do not work. They render nothing to the screen. However, the Custom Attributes example works fine, despite having almost the exact same code.

I found this bug while running compatibility checks on my own software. I wrote a shader which renders text sprites using particles. This works fine in 10.6, Windows, and Linux. However, 10.7 renders nothing. Further debugging by setting gl_FragCOlor = vec4(gl_PointCoord, 0., 1.); revealed that all the particles get rendered as solid red squares, instead of the expected red-green gradient.

I've been trying to determine what exactly is the difference between the examples that make Custom Attributes work, but not Particle Billboards, but I haven't made very much headway yet. This is exacerbated by the lack of a testing platform, aside from borrowing friends' laptops. Is this a known OS bug?

4

0 回答 0