Tagged Questions

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

learn more… | top users | synonyms

0
votes
1answer
46 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
106 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
16 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, ...
3
votes
0answers
95 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
57 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
45 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
48 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
36 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
72 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
60 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
58 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
83 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 ...
1
vote
1answer
168 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
162 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 ...
0
votes
0answers
32 views

Shadow bias selection with moving light

I've been looking at shadow mapping and although I managed to get them to work selecting an appropriate bias. The problem is when I start moving the light. The shadows work fine for not extreme ...
1
vote
1answer
124 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
51 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
262 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
602 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
544 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 ...
0
votes
0answers
238 views

Implementing Exponential Shadow Mapping

I've been following the tutorials (link1) and (link2) to implement Shadow Mapping. However, I'm getting shadowing artifacts which are quite ugly. I've done some research, and found that ESM ...
1
vote
1answer
342 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
153 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 ...
2
votes
1answer
92 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
182 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
0answers
146 views

Calculate parameters for orthographic matrix for directional shadow mapping

I am struggling with how I can fit my scene in an orthographic projection, based on what is visible by the camera. All tutorials so far explain almost everything in perfect detail, and then for the ...
0
votes
0answers
113 views

Shadow Mapping: How to calculate Axis Aligned Bounding Box?

I am trying to implement Shadow Mapping, which is actually working with an AABB that always covers my entire scene, but (obviously) it gives very blocky graphics. So I figured I need to calculate a ...
1
vote
0answers
129 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
264 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 ...
0
votes
1answer
121 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
609 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 = ...
0
votes
0answers
420 views

Shadow mapping shader sanity check

I'm making spotlight shadow mapping for OpenGL 4.3 deferred renderer and I do not get the desired results. Here's my fragment shader used to calculate spotlight and shadows for one spotlight: ...
2
votes
2answers
707 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 ...
1
vote
1answer
384 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
170 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 = ...
5
votes
1answer
1k 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 ...
1
vote
1answer
253 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 ...
2
votes
1answer
758 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 ...
4
votes
2answers
215 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
137 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 ...
1
vote
1answer
668 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: ...
2
votes
1answer
491 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 ...
4
votes
1answer
851 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 : ...
1
vote
0answers
150 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 ...
0
votes
0answers
106 views

Shadow Mapping Wrong Results

Since 2 days, i'm trying to figure out whats wrong with my shadow shader. The shadow map is drawn correctly, just the projection on to the scene is not working. The Vertex Shader Code seems fine: ...
2
votes
1answer
137 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
696 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
1answer
134 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 ...
0
votes
0answers
165 views

Shadow-casting through time acting in “reverse” before next notciable shadowmap update

question was re-written to better explain the problem I have a scene of big thin parallelepiped, small cube, and a light source, all aligned on Y axis, like so: _ | | | |----[ ]----Light |_| Both ...
2
votes
1answer
162 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 ...