[X3D-Public] Can I create a colored shape without any light effects?

John A. Stewart astewart at crc.ca
Mon Aug 3 20:03:49 PDT 2009


I have slightly modified your file, and have put it here:


(my mail reader has trouble with cutting and pasting many lines, so I  
put it up on the server)

> Problem 1: The light source is rotating with the scene, so if I use my
> mouse to rotate the scene 90 degrees up, I see caps, if I rotate by
> 180 degrees, I see nothing.

This should be ok now.

> Problem 2: I don't notice any change if I delete these two lines:
> DEF MYPROX ProximitySensor {size 100 100 100}
> ROUTE MYPROX.position_changed TO MYLIGHT.set_translation

This should be ok now.

> Problem 3: The decreased alpha "sometimes" renders as black instead of
> transparent. I observed that this "sometimes" depends on the order in
> which the spheres are defined in the x3dv file. ...
> correctly. Is this a bug in FreeWRL? I use FreeWRL 1.22.3 under Linux.

Yes, this bug was fixed in 1.22.4 of FreeWRL, which has been released  
for most platforms. Your observations are correct - good debugging work!

Note the changed fragment shader; if the fragment is 100% transparent,  
it calls "discard" rather than drawing the fragment.

This little example uses Spheres, you might want your boxes; play  
around with it. As I'm sure you understand, it only draws the  
fragments that "kind of" face the user; that simple algorithm can be  
tweaked to make it fit your requirements better.


This message was sent using IMP, the Internet Messaging Program.

More information about the X3D-Public mailing list