🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Latest shadows Activity
Just a small demo of triplanar texture mapping + normal mapping in action over a procedurally generated surface.
To better show the effect, in this simple demo I used a brick texture over a very smooth terrain (generated using small values of "persistence").
Textures from:
. FreePBR.com
. Textures.com
C…
Thanks for the ideas everyone!
@supervga and a-light-breeze, your note was actually RIGHT on the money - “glBlendFunc(GL_DST_COLOR, GL_ZERO)" gives the exact output I see in the original game, and I don't need to pre-process the texture to calculate alpha at all. That's amazing - I'll have to …
Aressera said: That's interesting. I have only used slope scaled bias on shadow map generation and have trouble completely removing acne, maybe I will try bias on the receiving end.
In my case I needed to make a decision on how to handle double-faced geometry for applying back-face-generated shadow …
I managed to get the back face shadow map generation working relatively easily…indeed, it does address the LOD transition shadowing issue. Of course, the shadowing itself is not working perfectly as I have various depth biases to (re)adjust/invert (I have different depth biases per shadow cascade t…
All what i can say is i had like 20 ifs in my shadow map code back then, because it was looking differently on every video cards. Sometimes, it looked a bit differently even after driver update... Especially with early radeon cards, which had less precisity of Z buffer than their nvidia counterpart…
Hello, I have a problem in DX9: I am projecting objects with the LightProj
matrix.
The problem is that my objects will be projected from (-infinity to +infinity).
At the end, I'm setting the object projection texture SetTexture(projection)
with
SetTransform…
MJP said:
I might have to think this through a little more, but typically you want your “rounding offset” (which snaps the texels of your shadow map to a fixed grid in world space) to be a translation applied to your projection matrix rather than being baked into the X/Y scale factors. Here's how I …
@WeirdCat
Hello _WeirdCat_,
thanks for your hint.
I replaced
glm::mat4 lightProjection = glm::ortho(-10.0f, 10.0f, -10.0f, 10.0f, near_plane, far_plane);
with
glm::mat4 lightProjection = glm::ortho(-(1024.0f / 768.0f), (1024.0f / 768.0f), -(1024.0f / 768.0f), (1024.0f / 768.0f), near_plane, f…
there is also an opengl call to get rid of noises, it would be hard to tell if it will help on you but its called glPolygonOffset and must be enabled with glenable with GL_POLYGON_OFFSET_FILL (and disable it once you are done).
@MJP Thanks for your reply. You were right, I was sampling using the wrong coorddinates. I have fixed it now, thanks!
You can also have a look at mapping spheres to 2D textures for single pass shadow-map rendering. Last time I checked it is also quite a bit faster than cube-map shadows.
What you get is basically an UV unwrap of the sphere onto a texture, which you then write your depth info to.
When you need to samp…
Hi everyone,
Today I want to talk about rendering. Last time, I implemented some random dungeons generation. Since the map can get a bit labyrinthic, I wanted to find a way to help the players orientate themselves. So I decided to add torches that auto-ignite when you get close to them;
But it means…