Advertisement

Latest shadows Activity

buzzelliart
November 29, 2023 08:14 AM
OpenGL procedural terrain - triplanar texture mapping + normal mapping

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…

2,010 views
Advertisement
How were shadow textures implemented in this 3D game from the 90s?

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 …

4,789 views

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 …

3,332 views

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…

3,464 views

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…

4,477 views
DirectX9 projection problem

Hello, I have a problem in DX9: I am projecting objects with the LightProj matrix. 
 

View and projection


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(m…

3,231 views

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 …

4,794 views
Creating Shadows with Vulkan

@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…

6,611 views
Directional Light Shadow Mapping Issues

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).

9,106 views
Help with applying PCF to shadows (DirectX 11)

@MJP Thanks for your reply. You were right, I was sampling using the wrong coorddinates. I have fixed it now, thanks!

6,205 views

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…

6,043 views
gregouar
September 11, 2020 03:06 PM
Approximated contact shadows from bent normals

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 …

7,908 views
Advertisement
Advertisement