Shadow mapping is a process by which shadows are added in 3D graphics scenes.

learn more… | top users | synonyms

13
votes
1answer
1k views

Shadow map artifacts

I want to try adding shadows to a 3D XNA game. I've set up some testing environment with one light and one camera. However, I'm running into artifacts with my approach. I'm using the shader code from ...
9
votes
2answers
1k views

Dual paraboloid point light shadows in deferred lighting setup

I've been playing around with this tutorial/sample code that demonstrates a simple implementation of light-pre-pass, which is a type of deferred lighting setup. I'm in the process of implementing ...
8
votes
4answers
2k views

Shadow Mapping and Transparent Quads

Shadow mapping uses the depth buffer to calculate where shadows should be drawn. My problem is that I'd like some semi transparent textured quads to cast shadows - for example billboarded trees. As ...
7
votes
3answers
3k views

First time shadow mapping problems

I have implemented basic shadow mapping for the first time in OpenGL using shaders and I'm facing some problems. Below you can see an example of my rendered scene: The process of the shadow mapping ...
7
votes
1answer
145 views

Shadowmap granularity

I thought that we could re-use the same shadowmap for every light. But I've seen an industry article suggesting that you can't re-use shadowmaps between lights, and have to use separate surfaces. Do ...
7
votes
2answers
957 views

Blurring point light variance shadow map

I've been working on implementing variance shadow mapping for my game. I was able to get a spot light working with variance shadow mapping with a gaussian blur applied to the shadow map to reduce the ...
7
votes
2answers
2k views

Point Light Soft Shadows

How to implement soft shadows for omni directional (point) light. We use typical shadow mapping technique. Depth is rendered to texture cube and addresing is pretty simple then. Just using vector from ...
6
votes
1answer
671 views

Need help with Shadows

I have started to develop an engine over on Codeplex but my shadows are not working correctly. I have been working for a week on it and can't figure out what is going wrong. I will be putting a 200 ...
5
votes
1answer
450 views

Exponential Variance Shadow Mapping - implementation

I use a variance shadow mapping with a "standard" light bleeding fix in my graphics engine which is based on deferred rendering.. I have a single shadow map for a directional light beacause a test ...
4
votes
2answers
166 views

Shadowmap first phase and shaders

I am using OpenGL 3.3 and am tryin to implement shadow mapping using cube maps. I have a framebuffer with a depth attachment and a cube map texture. My question is how to design the shaders for the ...
4
votes
1answer
841 views

OpenGL lighting with dynamic geometry

I'm currently thinking hard about how to implement lighting in my game. The geometry is quite dynamic (fixed 3D grid with custom geometry in each cell) and needs some light to get more depth and in ...
4
votes
1answer
1k views

Custom shadow mapping in Unity 3D Free Edition

Since real time hard and soft shadows are Unity 3D Pro only features I thought I will learn Cg programming and create my own shadow mapping shader. But after some digging I found that the shadow ...
4
votes
2answers
331 views

Shadow artifacts caused by filtering

I'm working on a shadow-mapping implementation for an OpenGLES 2.0 environment (Stage3D in Flash to be exact). This is how my current implementation works: Render the scene to backbuffer. Render ...
4
votes
1answer
286 views

Shadow mapping: what is the light looking at?

I'm all set to set up shadow mapping in my 3d engine but there is one thing I am struggling to understand. The scene needs to be rendered from the light's point of view so I simply first move my ...
3
votes
1answer
524 views

Shadow mapping does not work correctly using GLSL shaders

I'm a beginner in shadow mapping. I have in my scene two meshes : a cube and a floor. The scene is lighted by a single point light. Here's for the following display the light properties : ...
3
votes
1answer
730 views

First-Time GLSL Shadow Mapping Problems [closed]

I'm working on building out a 2.5D engine and having massive problems getting my shadows working. I'm at a point where I'm VERY close. So, let's see a picture to see what I have: As you can see ...
3
votes
1answer
872 views

Deferred rendering with VSM - Scaling light depth loses moments

I'm calculating my shadow term using a VSM method. This works correctly when using forward rendered lights but fails with deferred lights. // Shadow term (1 = no shadow) float shadow = 1; // [Light ...
3
votes
2answers
250 views

Fire range arc behind buildings

need some help with HLSL. Each charater in my game shows a fire range arc (which is a textured model) which show how far the guy can shoot, see It looks ok, but I hate the fact that it shows even ...
3
votes
0answers
77 views

OpenGL Shadow Mapping from directional light

I have read this tutorial: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/ I wonder, is this the current best technique for generating shadows in an arbitrary 3D ...
3
votes
0answers
64 views

PCF shadow shader math causing artifacts

For a while now I used PCSS for my shadow technique of choice until I discovered a type of percentage closer filtering. This method creates really smooth shadows and with hopes of improving ...
2
votes
1answer
146 views

Shadowmapping theory question

I think im on good way to grasp the complete concept of simple hard-edged shadowmapping! The thing i find the hardest to grasp though is about the individual shadow-render for each light... Since the ...
2
votes
2answers
184 views

Shadow mapping with directional light?

I'm doing shadow mapping in my OpenGL 4.3 deferred renderer, and I'm starting with directional lights believing it to be the easiest. What I do not understand is how the view projection matrix is to ...
2
votes
1answer
112 views

The math behind Variance Shadow Maps - moments

I am not asking how to implement them (that's not particularly difficult), but I'm having a bit of trouble understanding why the moments used in Chebyshev's inequality (indirectly) are equal to the ...
2
votes
1answer
225 views

How to transform a shadow map to camera view?

I'm making a rendering engine as a hobby to learn more about 3D. I have a deferred renderer with the G-buffer (color, normal and depth). I also have a lighting controller that uses only spotlights at ...
2
votes
1answer
721 views

Omni-directional shadow mapping

What is a good/the best way to fill a cube map with depth values that are going to give me the least amount of trouble with floating point imprecision? To get up and running I'm just writing the raw ...
2
votes
1answer
38 views

Compare world space distance to shadow map depth

I am rendering shadow maps to cubemaps (just rendering raw depth buffer) then projecting them to the scene to do omni-directional shadow mapping. The cubemap is sampled by the light direction vector ...
2
votes
1answer
275 views

Use depth bias for shadows in deferred shading

We are building a deferred shading engine and we have a problem with shadows. To add shadows we use two maps: the first one stores the depth of the scene captured by the player's camera and the ...
2
votes
1answer
319 views

Shadow mapping with deffered shading for directional lights - shadow map projection problem

I'm trying to implement shadow mapping to my engine. I started with directional lights because they seemed to be the easiest one, but I was wrong :) I have implemented deferred shading and I retrieve ...
2
votes
1answer
87 views

Cascaded Shadow Maps: clipping against scene bounds

I just implemented an initial version of CSMs based on the MSDN articles Common Techniques to Improve Shadow Depth Maps and Cascaded Shadow Maps. I fit the shadow projection to the view frustum, and ...
2
votes
1answer
387 views

Rendering lightmaps at runtime

I'm creating a procedural terrain system for Unity. And I'm looking for ways to efficiently cast self-shadows on it. If it wasn't procedural, I could simply bake a lightmap using Beast. But, I can't ...
2
votes
0answers
396 views

Rotating camera changes directional light depth map, and changes PCSS penumbras

I am implementing PCSS and I am using a directional light. The directional light volume is clamped to the camera frustum (as is typical with directional lights). So when the camera rotates, the ...
1
vote
1answer
269 views

shadow mapping and linear depth

I'm implementing ominidirectional shadow mapping for point lights. I want to use a linear depth which will be stored in the color textures (cube map). A program will contain two filtering techniques: ...
1
vote
1answer
404 views

samplerCubeShadow and texture offset

I use sampler2DShadow when accessing a single shadow map. I create PCF in this way: result += textureProjOffset(ShadowSampler, ShadowCoord, ivec2(-1,-1)); result += textureProjOffset(ShadowSampler, ...
1
vote
1answer
249 views

multipass shadow mapping renderer in XNA

I am wanting to implement a multipass renderer in XNA (additive blending combines the contributions from each light). I have the renderer working without any shadows, but when I try to add shadow ...
1
vote
1answer
118 views

Slope scaled depth bias with normal maps

I'm using a slope scaled depth bias to reduce shadow acne with shadow maps. However, it's causing artifacts when used with normal mapped surfaces because the bias varies over the surface, where it ...
1
vote
1answer
332 views

GL_EXT_shadow_samplers killing my shader

I have the following fragment shader for my scene #extension GL_EXT_shadow_samplers : require ... vec4 color = texture2D(uTextureUnit0, varTexCoord0); if (colorTransformEnabled != 0) { vec3 ...
1
vote
0answers
269 views

Cascaded shadowmapping problem with split distances

I'm doing cascaded shadow mapping and I have problem. From the cameras position, the splits are [camPos, 6], [camPos+6, 12], [camPos+12, 18] and [camPos+18, 100]. The "mSplitDistance" variable is the ...
1
vote
0answers
103 views

Shadow maps, reducing “shimmering”

I'm doing shadow maps, and my shadows move around, "shimmer", when I move around the camera. It is difficult to spot on still images but very much noticable in motion. I read an MSDN article ...
1
vote
0answers
91 views

Shadow mapping implementation not working?

I am trying to implement Shadow Mapping in my program using Java/LWJGL/OpenGL/GLSL, but I cannot get it to work properly. Let's start off with a screenshot first, then the relevant code and lastly ...
1
vote
1answer
149 views

Calculating shadowmap coordinates for cubemap in shading pass?

I'm trying to implement shadow mapping with cube maps. I believe I've done the first stage by filling the cube map, but for the final shading pass I am unsure how to exactly calculate the cubemap ...
1
vote
0answers
104 views

Simple shadow casting in 2.5D game

I am trying to build simple game and I just bumped on some logical problem that I am sure many of you already came across. I have a plane - floor and several sprites-trees that have tree texture on ...
1
vote
1answer
618 views

how to modify shadow mapping in “3D Graphics with XNA Game Studio 4.0”? [closed]

So I've been following the tutorials from the book Sean James's "3D Graphics with XNA Game Studio 4.0", and have been doing fine until i reached the shadow mapping part. in this book it creates point ...
1
vote
1answer
946 views

JOGL hardware based shadow mapping - computing the texture matrix

I am implementing hardware shadow mapping as described here. I've rendered the scene successfully from the light POV, and loaded the depth buffer of the scene into a texture. This texture has ...
1
vote
1answer
116 views

Can't run Nvidia PracticalPSM sample in debug mode

I want to add PSM (Prespective shadow map) to my engine but I have problems with that. I think the problem is somewhere in my math code so I want debug Nvidia PracticalPSM sample and compare the math ...
0
votes
1answer
1k views

Deferred rendering + Shadow maps

I have a 1920x1200 shadowmap which just has the depth values of my scene drawn from the point of view of the light. I also have a 1920x1200 gbuffer that draws my scene to a fullscreen quad. How can ...
0
votes
1answer
504 views

Shadows shimmer when camera moves

I've implemented shadow maps in my simple block engine as an exercise. I'm using one directional light and using the view volume to create the shadow matrices. I'm experiencing some problems with the ...
0
votes
1answer
141 views

Shadowmap moving with camera

I am trying to shadowmap a large terrain, I position my light that it is always at the position of the player and looking at the player, the problem is that the shadows now move with the player, I ...
0
votes
1answer
45 views

Rendering to specific face of a cubemap

I have working omnidirectional shadow maps for point lights. Rendering a shadow map for one point light consists of rendering the scene to 6 separate rendertargets, then send those render target ...
0
votes
1answer
92 views

Get the 8 corners of camera frustrum?

I'm doing shadow mapping for directional lights and I'm trying to get 8 corners of the camera frustrum as a bounding box for the geometry, but I have no idea how. The goal is like in the image below ...
0
votes
1answer
150 views

Directional shadow mapping view/projection matrices

I've got shadow mapping with directional lights working, but I believe I am constructing the view/projection matrices wrong. Here's how I build them: Mat4 viewMatrix = ...