Questions tagged [shadows]

Dark spaces cast by the presence of a solid object blocking the flow of light. Often helpful for telling where your character is going to land.

Filter by
Sorted by
Tagged with
2
votes
1answer
94 views

How does one model the sun in a ray tracer?

How is sun modeled when doing ray-traced rendering? Is it part of the scene, like a sphere with a centre in some far location or it is just considered as a point? Also regarding sending shadow rays ...
1
vote
1answer
45 views

Is there anyway to filtere a texture in glsl that turns stair like texels into smooth lines

I'm trying to filter a static, low resolution shadowmap. Unfortunatly, it doesn't look smooth, because of the way the default trilinear filtering works. It does have a smooth transition from light ...
0
votes
0answers
497 views

real time lights and high quality shadows in webgl build

I have a game in which there are a lot of objects constantly moving around and a lot of real time lights with their setting set to highest, I'm building my game as webgl and this is costing me a lot ...
1
vote
1answer
70 views

Softshadows create graphical errors

I have been implementing soft shadows into my game engine and it all looks ok in the beginning, but when I rotate the camera I get this... https://puu.sh/rQ7yG/8cd692aaab.png When I move around I also ...
2
votes
1answer
2k views

Cave lighting in Unity

I have a cave that is inside a mountain (one mesh) that I created in Blender. I would like to make the cave quite dark inside so that either the player can light it up, or it is lit up with things ...
1
vote
1answer
372 views

Particles not rendering over projectors

I am using projectors for shadows...When I use particles for bike speed up i.e., nitro speed the particles get cutout by those shadows.... Here is screenshot of it, Here is my shader code of ...
2
votes
1answer
437 views

Omnidirectional light (point) shadow mapping bug: everything's lit up white

I am facing a really frustrating problem. After looking at a lot of tutorials (probably all existing on net, not kidding), i tried to do the point light shadow mapping using a cube texture. The ...
0
votes
0answers
188 views

how to prevent stretched vertical shadow in blob shadow which projected by Projector of Unity

I feel it's a ridiculous because projector's rotation of X is 90. the projector is a orthographic. how can i prevent that long stretch shadow in vertical side of a platform?
1
vote
1answer
92 views

How to prevent a duplicated shadow?

It's a blob shadow which is built in Unity's standard asset package. As you see in the figure below, a shadow that is created by the Unity Projector is duplicated at the floor below. How can I ...
1
vote
0answers
143 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 ...
2
votes
2answers
5k views

How can I make shadows darker in unity5 without changing light intensity?

I have a problem where I want the shadow cast by an object to be a well defined and dark one. However I have to do it without changing how illuminated the object looks so only increasing the intensity ...
2
votes
2answers
7k views

Jagged shadows with default settings

This is what it looks like no matter the settings I use when I try to use shadows in Unity. Changing the Bias or the Normal Bias does effect the shadows, but I cannot get the shadows to be smooth with ...
0
votes
2answers
2k views

Unity - How to get nicer shadows from distant point lights?

I get too unsatisfying results for shadows when using a point light that is far away. (The quality settings are maxed.) The scene: The result: The light: What can I do to get better shadows?
1
vote
2answers
2k views

Sprite with shadows in both sides

I have a gameobject with a SpriteRenderer, and I want it to cast (and receive) shadows like a 3D model. The sprite will turn around depending of his direction, so all faces must cast shadows. I ...
3
votes
0answers
210 views

OpenGL ES 2.0 not drawing images with shadows

I'm using OpenGL ES 2 to program a simple game 2D for Android mobile phones. I'm coding the rendering portion of the software, using the GLES20 default library. All my sprites are rendered from a ...
0
votes
1answer
231 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 ...
0
votes
1answer
172 views

Strange shadow behavior when light direction is parallel to a plane

i have a strange problem with shadow acne. It occurs when the light direction is parallel to a plane. Here is my code and a few images of the problem: ...
1
vote
0answers
266 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 ...
5
votes
3answers
3k views

Where to cast light/shadows in a 2.5D view?

I'm working on a tile-based 2D pseudo top-down/side-on game very much in the graphical style of Prison Archiect. More specifically, I'm referencing their style of drawing wall tiles where you can see ...
3
votes
0answers
676 views

Would this 2D Lighting and Shadows implementation work? [closed]

I'm writing a top-down 2D tile-based game and I'm trying to decide on how to implement lighting and shadows. The game will have a large number of light sources, some static and some moving around the ...
0
votes
1answer
122 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 ...
2
votes
1answer
768 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 ...
3
votes
1answer
4k views

Why are there no dynamic shadows in UE4?

So my problem is that other than for static objects which have baked shadows from building lighting, there are no shadows for movable objects, like those cubes. Neither from the Light source actor, ...
2
votes
0answers
71 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 ...
1
vote
0answers
1k views

Smooth+Flat shaded meshes cause shadow artifacts (understanding the source of the problem)

I'm using blender to create assets to use in Unity3D, and I'm having some trouble understanding how the smooth/flat shading interacts with shadows, I'm sorry if it has been asked before, but all the "...
4
votes
3answers
548 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: ...
7
votes
0answers
296 views

How to draw Shadow Volumes in one draw call?

I've got a simple app that draws 3D cubes using instance rendering and I'm implementing Shadow Volume. Each cube's vertex, uv, normal and index data are statically stored in 4 vertex array buffers. On ...
5
votes
0answers
176 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, ...
2
votes
1answer
229 views

Directional Light shadow mapping error - opengl

i need some help with shadow mapping (directional light) in opengl 3.3 and GLSL. The problem is that the shadows are not displayed correctly over de 3d models and primitives: This is the code that ...
1
vote
1answer
4k views

Multiple lights shadows

I'm trying to achieve multiple lights shadows. Currently my program works using only 1 spotlight as a light source that produces shadows. Well... I want to involve multiple lights to give a more ...
1
vote
0answers
57 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 ...
4
votes
1answer
323 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 ...
4
votes
0answers
682 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 ...
2
votes
0answers
140 views

Instancing meshes messing up scene lighting

I've been rendering a scene (some objects over a large field of grass) to test shadow mapping which is working fine. But when I use instancing to "gain" performance, I not only get a decrease in ...
0
votes
1answer
425 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 ...
43
votes
1answer
10k 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 ...
6
votes
1answer
800 views

Dual paraboloid shadows on GLSL

I'm trying to port an XNA example to OpenTK + OpenGL, I found it here http://graphicsrunner.blogspot.com.es/2008/07/dual-paraboloid-shadow-maps.html But I'm having a really hard time, I think my maps ...
5
votes
1answer
12k views

How to create 2D shadows and lighting?

How do I create shadows and lights in a 2D top down perspective game? I want to achieve an effect similar to this game (also made in unity) where some objects like a torch, different sprites, and the ...
11
votes
1answer
753 views

How can I implement lights & shadows in a multi-layer 2d tilemap?

I am in the process of writing an isometric game from scratch, and I'd like to know how/if I can add lights and shadows. The code I have so far can be found here, but it should be enough to know that ...
3
votes
1answer
2k views

Creating Fog Of View in 2D game with lighting method

I'm creating 2D side scrolling game with Unity, and i want to add feature where the player come into a cave, then all going dark, the player turn on the flash light, so the player can see around ( ...
1
vote
1answer
2k views

Ray tracing - soft shadow

I'm implementing my own ray tracer as an iPad app for a school project. At the moment this is the result: I need to add the last requirement, soft shadows, but I can't find a complete reference ...
1
vote
1answer
166 views

Efficient dynamic character shadows [SW Rasterizer]

I am working on a SW rasterizer for a quarter-century old console (think sub-100 MHz RISC CPU, no dedicated 3D HW, couple megs of RAM) and am approaching a stage where I will be adding dynamic ...
1
vote
0answers
186 views

Why would an ambient occlusion (AO) shader's performance be dependent on light direction?

One of my favourite games recently implemented ambient occlusion as a graphics feature, which appears to perform very well in most circumstances - except during sunrise and sunset. As someone who is ...
2
votes
1answer
264 views

Shadow mapping bone animated model

I am trying to get shadowmapping right for my animated models. It works perfectly for static meshes but the animated models are just wiggeling a bit here's the vertex shader for rendering to the ...
5
votes
1answer
377 views

LibBDX create a tail when the object is moved

I am looking for a way to implement in my game a kind of shadow/tail which will be displayed after the object is moved. Should I use animation? If yes how? Here an example:
1
vote
2answers
624 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 ...
5
votes
2answers
2k views

How do I optimize 2D visibility cone calculations?

I'm creating a simple 2D game and got a little bit stuck with a visibility cone algorithm, influenced by walls and other obstacles on the map. The only issue I'm currently having, is that it's very ...
2
votes
0answers
367 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 ...
3
votes
0answers
186 views

Does anyone know what technique was used in Minecraft to create shadows? [closed]

Specifically I want to know the technique used to render shadows under animals and players. I would like to create shadows like that for my own block game but I don't even know what to google. Any ...
0
votes
0answers
134 views

XNA/C# Shadows look strange in orthographic

I have implemented shadows in to my game engine. They look fine when rendered in projection mode as a projected light, however I get a strange "blocky" look when they are put into orho'. I will be ...