4 ms·
Can't you draw the shadow as a blended polygon where you gouraud shade from full opaque to full alpha the penumbra area? (so you thus have to draw triangles in
by otis_inf 11y ago
Can't you draw the shadow as a blended polygon where you gouraud shade from full opaque to full alpha the penumbra area? (so you thus have to draw triangles in that area)? This will produce soft shadows (due to the shading) and will take not much calculations (per vertex in the model casting the shadow, you have to cast its shadow point on the surfaces the shadows are casted at from the lightsource which isn't a point anymore (so you get the penumbra, like in the image in the article)
Not sure if this will work, I thought about this years ago when I was still in the demoscene but never had the time to implement it.
- Arelius 11y agoWith shadow buffers this will not work, since you are not in fact rendering a shadow mask, but instead a depth buffer with distance-to-occluder, which cannot be blended as it'd be entirely incorrect. Even if you could, the penumbra size is a function of not only the light size but also the distance from the shadowed surface to the occluding edge, which is fundamentally something you cannot know during shadow occluder rendering time.