Shadow mapping is a process by which shadows are added in 3D graphics scenes.
0
votes
0answers
12 views
Opengl - SpotLight shadow map issue
I have a light / shadow system that implements a spot light too.
Every lights are working fine, but the spot light is acting weird.
If i dont use any type of "shadow softening" method, it works ...
0
votes
0answers
28 views
Opengl - Spotlight shadow clipping problem
I implemented a light system + shadow mapping.
Everything works fine with point light / directionnal light, but when i come to do spotlight shadow mapping, its a little messy.
Im pretty sure this is ...
1
vote
1answer
40 views
Problem with RGBA sampled shadowmap
I'm having a problem with the generation of a shadowmap that is converted to RGBA. The following glsl code is used to put the depth into the depthbuffer :
/**
* float/rgba8 encoding/decoding so that ...
0
votes
0answers
21 views
Opengl - Shadow map working with Nvidia graphics but not working with AMD
At school i am using an up to date NVIDIA graphic card and i did my shadow map suscessfully.
I tried to copy the project and try it at home with my AMD graphic card (which i just updated).
Now ...
0
votes
1answer
43 views
Opengl - Shadow mapping issue
I am currently trying to do a shadow map.
Here is the depth map when drawn on a quad (Which looks good to me):
And here is the final result when i try to cast the shadow in my fragment shader:
...
1
vote
0answers
40 views
Shadow Mapping, why does my shadow change size and position when I rotate my light?
I have looked far and wide for this and have not found any issue like this, so far. Basically, when my light is at a certain angle my shadows seem to be correctly positioned and scaled, yet if I ...
0
votes
2answers
80 views
Shadow mapping too slow and ugly! [closed]
As many of you are, I am working on a game.
I have just added my first attempt at shadow mapping (standard variation) and quite frankly I am very disappointed.
I am literally squeezing as much out ...
0
votes
1answer
125 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
62 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
257 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
70 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
75 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
107 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
170 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
38 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
117 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
49 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
186 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
57 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
27 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
27 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. ...
2
votes
1answer
296 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
94 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
136 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
121 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 ...
30
votes
1answer
4k 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
316 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
79 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
208 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 ...
1
vote
2answers
200 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
141 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
496 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
241 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
165 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
1k 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
2k 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
70 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
238 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
161 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
173 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
285 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
32 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, ...
8
votes
1answer
536 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
297 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
181 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
244 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
104 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 ...