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

learn more… | top users | synonyms

0
votes
0answers
19 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 ...
27
votes
1answer
2k 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 ...
2
votes
0answers
28 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 ...
1
vote
0answers
51 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 ...
2
votes
0answers
31 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
49 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
1answer
92 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
82 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
83 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); ...
0
votes
2answers
119 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
322 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
117 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
286 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 ...
0
votes
0answers
65 views

unity pass texture from one camera to another for shader

I'm working on a system where I have to get a texture from one camera to another (render a -> render b) is there an easy way to do this? For a simplified example this would be used to get the ...
5
votes
1answer
503 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
54 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 ...
0
votes
0answers
71 views

Xna: Basic shadows

I have been programming in xna for quite some time now an I would really like to get real time shadows working. I have shadows already in my game which I got from "reimers shadow map tutorial". The ...
1
vote
1answer
106 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 ...
2
votes
1answer
90 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 ...
4
votes
1answer
661 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
122 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
205 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 ...
0
votes
0answers
27 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, ...
5
votes
0answers
328 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 ...
1
vote
0answers
138 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
126 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
139 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
0answers
135 views

Is it possible to loop over an array of samplerCube/samplerCubeShadow using OpenGL/GLSL?

I try to manage a scene with several point lights. For the moment my program works perfectly with just one point light. So I have in my fragment shader the following uniform declaration: uniform ...
0
votes
2answers
92 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
87 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
115 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
116 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
291 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 ...
1
vote
1answer
525 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 ...
1
vote
1answer
286 views

How to make other semantics behave like SV_Position?

I'm having a lot of trouble with shadow mapping, and I believe I've found the problem. When passing vectors from the vertex shader to the pixel shader, does the hardware automatically change any of ...
1
vote
1answer
58 views

Depth Map resolution shifting

the problem is with shadow mapping as you can see, actually it works fine but in a certain condition that the Depth Map size must be equal to the size of rendering buffer, I use an infinite ...
1
vote
1answer
721 views

Shadow map: depth texture always returns 0

I'm implementing a shadow map for the sun light in my voxel engine using a depth texture attached to a framebuffer. But when I sample the depth texture during the normal pass, the value returned is ...
2
votes
1answer
2k views

How do I fit the camera frustum inside directional light space?

I'm trying to improve the coverage of a shadow map for a directional light. Currently, it works great if the camera is looking straight down. However, if the camera is close to the ground and looking ...
4
votes
0answers
938 views

OpenGL Shadow Mapping from directional light [closed]

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 ...
1
vote
1answer
433 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
votes
2answers
240 views

GL ARB Shadow Ambient Extension is not supported

I'm trying to build a game engine with LWJGL under Java. I'm want to implement Shadowmapping, but I'm stuck with the tutorials from Oskar Veehoek (here, specifcally). When I try to use the shadow ...
3
votes
1answer
136 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 ...
0
votes
1answer
404 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 ...
1
vote
0answers
157 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
385 views

Shadow mapping implementation not working? [closed]

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
171 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
2k 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 = ...
2
votes
2answers
2k 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
752 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
205 views

Center directional light shadow to the cameras eye

I'm currently drawing my directional light shadow using this view and projection: XMFLOAT3 dir((float)pitch, (float)yaw, (float)roll); XMFLOAT3 center(0.0f, 0.0f, 0.0f); XMVECTOR lightDir = ...