[solved] Back half of cube is being clipped (using geometry shader).

I’m working on a geometry shader that takes points, color, rotation, scale and generates a 3d cube.

The code (including the GS, VS, and FS):

For some odd reason the back half of the rotating cubes are clipped… and they’re not clipped on the back plane (which is at 100) because I can move them closer and further and the back is STILL clipped.

I’m fairly sure it has to do with my geometry shader, but after googling for hours I can’t find anything =/

The only thing I suspect it could be would be gl_ClipDistance - something I could set to fix it? But there’s no good information online…

Thanks!

Here’s a picture of what it looks like:


http://i1150.photobucket.com/albums/o604/ClickerMonkey/Clipped_zpsfba5e54a.png

That doesn’t look like culling. How is it being rendered what type of polygon are you using.

use vec3 for the position and just a mat3 for the roation matrix. I guess your problem is that the w component of the corners is 0

That’s why I said clipping =P

Holy moly! You’re awesome =P I changed the w component of the corners to be 1.0 and not 0.0 and it worked! (derp they’re points not normals)

Very odd, I wonder how having them be 0.0 would cause the backside to be clipped…

Anywho, thanks!