Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / Argh, stencil shadow glitch! Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
Shawn Swift

March 31, 2005, 11:25 PM

I keep getting this weird video glitch when I try to render shadows. I think I'm not capping the shadows properly, but I'm getting a weird sound too, it might be some kind of graphics card bug?

Here's a screenshot showing the problem:

And here is the demo:


April 01, 2005, 04:52 AM

I don't see anything wrong in that screenshot...what is the glitch?

Shawn Swift

April 01, 2005, 05:13 AM

Well if you look closely you can see there's aliasing along some edges and the shadow under the cube is kind of round instead of square! You really need to see it in motion to see the problem.


April 01, 2005, 06:04 AM



April 01, 2005, 09:09 AM

> but I'm getting a weird sound too


Shawn Swift

April 01, 2005, 11:21 PM

Well at least I got one person. :-)


April 02, 2005, 02:45 AM

I tried to run it but it went into some crazy video mode on my computer and I had to kill it. From the screenshot, that aliasing along the shadow edge looks correct. Stencil shadows have hard edges. The aliasing is more obvious because it runs along the line in the texture. If the shadow wasn't directly on that line it wouldn't be so obvious. I don't know what is up with the shadow beneath the cube. You must be using some other geomtry besides that cube for its shadow.


April 02, 2005, 02:46 AM

I definitely hate you.


Shawn Swift

April 02, 2005, 05:02 AM

It was all an elaborate april fools prank. :-)

That screenshot is from a tank game I am making, but it does not contain any stencil shadows.

The weird video mode isn't a weird video mode at all... I grab a copy of the desktop, remove the blue channel to give it a mangenta tint, scale it to 50% size, and then flip the image rapidly with a blank image, with vwait turned off. This creates the flickering/tearing effect. :-)

At the same time I play a sound like a high pitched whine, with a pop at the end. Then I display a generic gray window that looks quite plain, just like the sort of thing a monitor displays, and it shows the horizontal an vertical frequencies being too high, and "out of sync" flashes.

Then the screen goes blank.

It's all a simple graphics trick, and it doesn't do anything damaging to your monitor, only to your ego. :-)


April 02, 2005, 10:04 AM

not funny! :P

This thread contains 10 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.