Questions tagged [shadow-mapping]

Technique used to produce shadows in a 3D scene, by drawing objects to a texture or textures, and then mapping them onto a scene.

199 questions
1
vote
1 answer

Cascaded Shadow Maps don't work as expected

i'm trying to implement Cascaded Shadow mapping using opengl but i got some problems. i start by dividing my view frustum to three splits and for each split it has a 1- near 2- far 3- corners (corners of the frustum of this specific split in…
1
vote
1 answer

How variance shadow maps moments fall into Chebyshev's inequality

I'm having hard time understanding how the moments fall into place into Chebyshev's inequality. I'm reading about the technique in the following article. In the article the following is written: Using the variance, we can apply Chebyshev's…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
1
vote
2 answers

Understanding image dithering and how they help blending CSM

So I wish to implement dithering as a blend mode between my cascade shadow map splits. I had no idea what they were so I've watched this video to try and understand it.As far as I understand it it's a way to map an image colors to a limited pallet…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
1
vote
1 answer

Calculating tight ortho projection matrix for shadow mapping

I'm trying to calculate tight ortho projection around the camera for better shadow mapping. I'm first calculating the camera frustum 8 points in world space using basic trigonometry using fov, position, right, forward, near, and far parameters of…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
1
vote
1 answer

Shadow Mapping OpenGL shadow not always drawing, and drawing where the position of the light is

I have been trying to do basic Shadow Mapping in my custom Engine using LearnOpenGL as the source. The link for the exact tutorial can be found: here. I have been debugging this bug for around two weeks, researching the internet, and even trying to…
MrAbnox
  • 23
  • 6
1
vote
0 answers

DX11 - Directional light shadow map depth value always returns 1

I'm working on a graphics program in DirectX11 which takes a heightmap, manipulates a plane based on the heightmap, calculates the normals, and lights the scene with a directional light. I'm trying to get shadow mapping to work with the directional…
Konomira
  • 13
  • 2
1
vote
1 answer

Understaing shadow acne better

I'm currently learning about shadow mapping from here. I'm trying to figure why shadow acne is happening at-all, I've tried looking at every video/resource I found online, some relate the issue to floating point rounding errors, other say it's about…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
1
vote
0 answers

How to set a negative bias value for light in order to remove the shadow problem?

In our game, we use spine characters which is a 2D mesh. The shadow of the spine characters isn't tightly next to the mesh of spine characters where there always has a crack despite I have already set the bias value to 0. It's so weird. I try to…
wavebbs
  • 11
  • 2
1
vote
1 answer

C++ Comparing shadow map matrix with draw matrix doesn't create shadows

I am trying to implement shadow mapping. I am able to render a depth map onto a framebuffer texture. and send it to the shader, as well as the lights orthographic matrix to test if a fragment is in the shadow. But the results are not correct.…
Elias
  • 195
  • 2
  • 13
1
vote
1 answer

DirectX 11 front face culling does not cull front faces in shadow map

I try to implement shadow mapping (CSM) on DirectX 11 and succeeded to get a prototype working. Right now I have drawn the geometry using back face culling in the shadow map pass but I now want to switch to front face culling to further reduce…
1
vote
0 answers

OpenGL rendering to texture produces empty Texture

I am trying to render and orhto projection of my scenes depth values to a texture inorder to use the texture in a later render cylce to determine what fragments are in shadow. Basically a Shadow Map. However the texture that I am rendering to ends…
1
vote
1 answer

Shadow mapping issue

I've implemented shadow mapping to generate shadows on a terrain. I render the scene (or the objects that cast shadows) from the light's perspective and then generate a depth map to be sampled during the second render pass (as all the tutorials on…
Luca
  • 1,658
  • 4
  • 20
  • 41
1
vote
1 answer

How to detect edge of shadow map texture GLSL

I was wondering how I could detect the edges of my shadow map texture in my fragment shader. I took a look at the following tutorial on youtube: https://www.youtube.com/watch?v=9sEHkT7N7RM But in that guy's case, the solution depends on the camera…
1
vote
1 answer

OpenGL ES3 Shadow map problems

I work on C++ project for Android with OpenGL ES3, so I try to implement the shadow map with directional light, I understand the theory well but I never get it successfully rendered. first I create the framebuffer which contains the depth…
user8581488
1
vote
2 answers

Sampling from depth texture always results 0

I am attempting to implement shadow mapping using opengl, using a directional light. I have confirmed that the depth texture is correctly rendered, like so: And to perform a visual inspection, I also output the world space coordinates, transformed…
Ian Young
  • 1,712
  • 1
  • 16
  • 33