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

learn more… | top users | synonyms

0
votes
1answer
86 views

Why does lightmapping take so long compared to real time shadows?

I am using Unity 5. As a test, I set the realtime shadow resolution to max and the distance to cover my entire scene with no cascades. As expected, it lagged severely, but I could still move the ...
1
vote
0answers
57 views

Front Face Culling with Shadowmapping

To avoid shadow acne I usualy use front face culling which works great. But for my current implementation the mesh is a quite complex terrain (depending on the lod level) and than the shading (dot ...
1
vote
1answer
185 views

Implementing Shadow Mapping in Python and OpenGL 2.1

I am trying to create a little shadow mapping demo. My code is currently divided into three rendering passes: Pass 1 - Create the depth texture that will be used for shadow mapping on an offscreen ...
4
votes
0answers
66 views

How do I align the cube in which shadows are computed with the view frustrum? (“View Space aligned frustum”)

Short and concise: Given 8 world space positions that form a cube of arbitrary size, position and orientation and given an arbitrary light direction. How do I compute the View and Projection matrix ...
0
votes
1answer
60 views

My point light shadows only really work if my point light is at the world origin (0,0,0)

When I move the light, the shadows will fall apart as if their occluders aren't occluding them in certain areas. For example, in the following scene, I move a pointlight 400 units down the Z axis, I ...
1
vote
1answer
94 views

HLSL pixel inside a view (cascaded shadowmapping)

I'm figuring out shadowmapping in HLSL (see also this question). I understand that I need projection matrices for each cascading shadowmap. I use this code to create the projections: Matrix ...
1
vote
1answer
118 views

HLSL Shadowmap shader for large scale environments

I'm working on a racing game in Monogame. The game runs fine so far using Monogame's BasicEffect (link to video). I wanted to add shadows so I implemented a shadowmap using this as a base. and a ...
1
vote
0answers
35 views

Direct3D11: Directional Shadow Maps

I've recently implemented shadow maps on my project. However, I'd like to add a feature that allows the light direction to be dynamically changed, so that the terrain can be viewed using different ...
3
votes
1answer
78 views

Issues with depth calculation in HLSL shader

I'm currently trying to implement shadow maps in my graphics framework. I ran into an issue with depth calculations I wasn't able to solve myself (yet). I did a lot of testing and debugging and think ...
2
votes
0answers
48 views

Consistent Shadow Map Filtering

I want to filter my shadow map generated by PSSM, but the problem is that I have a inconsistent filter size. The problem is that the shadow map sources rotate to find the best fit for the camera ...
4
votes
3answers
172 views

Can't find the solution to the “shadow acne” problem

This is how it looks now: This is the code that generate the shadow matrix an shaders source: void shadow::calculateShadowMatrixFromLightPointOfView(vector3f lightPosition, vector3f ...
3
votes
0answers
54 views

Virtual infinite plane in shadow map

I have a WebGL deferred rendering pipeline, where I'm rendering shadow map with VSM technique. The goal is that the scene, or model, is hovering in space, and in addition to casting shadow on itself, ...
1
vote
0answers
25 views

Directional light view frustum stabilisation

Calculating directional light view frustum based on scene objects(bounding frustum) results in noticeable scene jittering on camera movement in CSM and non-CSM rendering code paths. What are the ...
1
vote
0answers
26 views

DirectX 9 Light projection

I am trying to see changes of component 'z' from light space. In vertex shader component 'z' divide 'w' is not 0. But after sending float4 with texcoord1 to pixel shader its 0. All matrices are good. ...
0
votes
0answers
101 views

How do I calculate the matrices required for cascaded shadow maps?

I'm trying to switch over to Cascaded Shadow Maps (CSM'S/PSSM's), however this topic is quite complex and I'm not quite getting the expected results. Note: I already have a functioning standard ...
2
votes
1answer
226 views

How to attach a framebuffer to a whole cube map from a GL_TEXTURE_CUBE_MAP_ARRAY?

I'm trying to make shadow cube maps in an array. I want to draw each shadow map with a single pass using a geometry shader, which I read about here: http://stackoverflow.com/questions/462721/...
4
votes
1answer
83 views

Only one object rendered to FBO for Shadow Map

I've been playing around with rendering shadow maps using FBOs in OpenGL. I set up a simple directional light in my engine and managed to get a shadow map rendered. My Scene is a big castle and the ...
3
votes
0answers
126 views

Shadow mapping - Can't get the right texture coordinates

I'm trying to implement shadow maps for Spotlight's, but alas I can't get them to work. I have verified that my fragment shader is getting the shadow map texture. I can sample from it in the ...
0
votes
1answer
103 views

Generate Mesh of Shadow Volume

Given a mesh, I want to generate another mesh that is effectively a shadow volume of this mesh. I am looking for an algorithm/solution/implementation/reference that can do this under the following ...
29
votes
1answer
3k views

Why is shadow mapping the standard?

Though I am a programmer by trade, I have barely touched game development at all. I've had this question for some time, and now that I'm looking into game development I thought it would be a good time ...
3
votes
0answers
262 views

OpenGL Depth Cubemap with Geometry Shader Not Rendering Correctly

I was having some trouble with cubemaps in OpenGL, and was hoping to get some help. I've been following a tutorial about point light shadow mapping using cubemaps, where a geometry shader is used to ...
2
votes
0answers
71 views

How do you fix wobbling shadow edges?

I've implemented an omni-directional shadow map and I've noticed a rather unwanted behaviour on the shadows. It seems like when the angle between the occluded points and the light source is really ...
3
votes
0answers
151 views

How do I sample a cubic shadow map in DirectX 11?

I've implemented a cubic shadow map for dealing with omni-directional light sources in my scene. By defualt it produces hard shadows Obviously a shadow map with higher resolution (currently using ...
0
votes
0answers
79 views

LWJGL - First time trying to implement shadow mapping

It's my first time when I implementing shadow mapping. My problem is shadows don't work in any way. First I just render all of the object to a FBO with simple shader. shadowMapGenerator.vs: #version ...
1
vote
2answers
176 views

Clip shadow frustum to scene bounds

I have a global light in my scene. It casts shadows using shadow mapping and has an associated camera (for rendering to the shadow map). I'm going to refer to it as my "shadow camera" from now on. I ...
2
votes
1answer
126 views

What can cause shadow slicing while moving camera?

Can't explain better than with video: https://youtu.be/4nIMIL6w-0M The effect I'm trying to achive is a simple fog of war. See, I have a point light casting shadows on a plane. The plane has a ...
0
votes
2answers
381 views

Disable/Remove Warning about a not bound Render Target View

So to render into my shadow map depthstencil buffer i only bind a DepthStencilView to the Output Merger. Like this m_pContext->OMSetRenderTargets(0,0, m_pShadowMapDV); m_pContext->...
0
votes
2answers
212 views

Directional light and finding relevant shadow casters

Right now when culling the models to render for the directional light shadow map pass I just do a view frustrum culling using the main camera. At some angles, the objects will be outside the view but ...
2
votes
0answers
334 views

PSSM and tightening the split frustrums

So I have implemented PSSM which currently does not care about the objects in the scene, meaning alot of resolution is wasted on empty space. This image shows the bottom two splits wasting alot of ...
2
votes
1answer
153 views

Why does my simple OpenGL shadow map fail?

I want to render a simple shadow map for grass, where closer looks brighter and further looks darker, from the view of the light point. I can't get it to work. Here is the relevant code: //setting ...
1
vote
1answer
809 views

Custom shadowmapping in Unity not working properly

To experiment with a certain technique, I'm implementing my own shadow mapping in Unity. I'm using a camera for the light "view", which is rendered to a RenderTexture after being post-processed with ...
5
votes
1answer
1k views

unity 5 how to get a shadowmap

I'm writing a custom shader in unity 5 that requires a shadowmap (not just for drawing shadows but also for different computations involving scattering particles through fog). Does anybody know how to ...
1
vote
1answer
69 views

Pick which directional light shades which object

Suppose you have two directional lights pointing at one sphere from different angles. You would expect the sphere to cast two shadows, but it turns out that this isn't the default behavior. The first ...
1
vote
1answer
205 views

Can drawing to an FBO be done purely with a depth input texture, or do I also need a color attachment?

I am trying to implement Exponential Shadow Maps and I've got it almost working. The part I am stuck on is the "optional" separable Gaussian blur of the depth map to give soft-looking shadows. I am ...
1
vote
2answers
84 views

Rendering order of shadowing point lights?

I'm implementing shadow mapping in my deferred rendering engine. I've got spot lights working, and now I'm working on point lights. Currently, I do it like this: // Loop through the point lights for ...
2
votes
1answer
147 views

Failing to move exponential depth term to depth shader in exponential shadow mapping

I'm playing around in my little toy project to see if I can understand how exponential shadow mapping works. To begin, I have the following two fragment shaders: Light depth texture shader layout(...
4
votes
1answer
1k views

C++ OpenGL ShadowMap Issue/Artifacts

I am currently implementing basic shadow mapping in my C++ Custom Engine using GLSL 4.10. It is currently working with basic PCF anti-aliasing and very minimal reduction for unwanted artifacts. Here ...
0
votes
1answer
160 views

Backface culling without light leaking through

I want to be able to see through walls, so to do this I used planes for the walls, and enabled backface culling. However with shadow mapping I have a lot of light leaking through: I read that using ...
3
votes
1answer
270 views

Shadow mapping. I don't understand what to do after creating the depth texture

I'm taking an intro to computer graphics course, so this is something we haven't touched on. I am reading this tutorial http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-...
0
votes
0answers
30 views

Artefact in VSM as if GL_DEPTH_TEST disabled

I am trying to implement VSM and I incurred in a strange issue. I render them as follow: glUseProgram(shadowMapProgramID); glEnableVertexAttribArray(0); glBindFramebuffer(GL_FRAMEBUFFER, ...
7
votes
0answers
488 views

Variance shadow maps don't want to render properly

I've implemented VSM (and also ESM) in my engine but results are for me not as I expected and saw in many examples published on network. I set filtering of shadow maps to GL_LINEAR but when I compare ...
2
votes
0answers
262 views

Shadow map shimmering, indexing outside the shadow map

I have tried to reduce shadow shimmering/flickering using technique described here: http://msdn.microsoft.com/en-us/library/windows/desktop/ee416324%28v=vs.85%29.aspx I works as I want and shimmering ...
0
votes
0answers
166 views

Shadow mapping comparing depth in GLSL

I've been trying to figure out how to compare against my shadow map, which has a shader that just does the following: gl_FragColor.r = gl_FragCoord.z; And my vertex shader for the render pass does ...
0
votes
0answers
224 views

Depth texture white in shader

I am trying to implement shadow mapping into my project and am stuck at this problem: If I'm reading the shadow map values with glReadPixels and linearize those values, I am getting exactly the value ...
0
votes
2answers
102 views

HLSL Shadow Mapping occurs only around player

I've recently begun playing around with Monogame (OpenSource "remake" of XNA). My current task is to write a simple shadow mapping shader. After following Riemer's XNA Tutorial I got the shadows to ...
1
vote
1answer
109 views

how to define a field of view for the entire map for shadow?

I recently added "Shadow Mapping" in my XNA games to include shadows. I followed the nice and famous tutorial from "Riemers" : http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map.php . ...
2
votes
0answers
162 views

Compute directional light frustum from view furstum points and light direction

I'm working on a friends engine project and my task is to construct a new frustum from the light direction that overlaps the view frustum and possible shadow casters. The project already has a ...
0
votes
2answers
164 views

Single texture or one texture per light for shadow mapping

The basic implementations of shadow mapping that I have seen create a depth texture for each light source affecting the scene. I'm just curious as to why this might be done rather than using and ...
2
votes
1answer
427 views

Shadow Map field-of-view

I'm implementing a shadow map algorithm with a spotlight (a spotlight that always "looks" at a given object). My issue is that for some configuration, part of the object the light is "looking at" is ...
2
votes
1answer
1k views

Reflection and shadows in OpenGL

I'd like to implement shadows and reflective surfaces in my OpenGL app. I already have ideas which I will provide below. But I would like to ask someone more experienced than me before I put too much ...