Questions tagged [shadow-mapping]

Technique used to produce shadows in a 3D scene, by drawing objects to a texture or textures, and then mapping them onto a scene.

199 questions
1
vote
1 answer

OpenGL - Unable to write to frame buffer (or read it properly)

So I've been trying to get shadow mapping to work, but I was unsuccessful, and I am now trying to simply write anything to the frame buffer and then render it to a quad as a texture. I've been looking at this small piece of code for 10 hours, so I…
MulattoKid
  • 573
  • 6
  • 14
1
vote
0 answers

Calculate shadow map for te

I have a problem when trying to generate shadow map from the terrain map from my data. I already success to use lighting procedure like show in picture below (directional lighting, azimuth:180', elevation:90'). Eventually I need to apply more…
zufryy
  • 177
  • 2
  • 10
1
vote
0 answers

Limitations of prebaked soft shadows

I'm working for 2 months on prebaking PCSS of nVidia with cubeTextures in WebGL. I have succeeded in implementing the beast in real time. Prebaking it finally works too, but with some obvious artifacts. To be brief, lower I highlight the main…
MrBooks
  • 85
  • 10
1
vote
0 answers

What projection matrix does SceneKit use for directional light shadows?

I'm trying to prevent shadow swimming when moving the directional light around to cover only the visible part of my scene. Despite rounding the translation components in light space, they swimming artifacts are still there. I even tried pointing…
Curyous
  • 8,716
  • 15
  • 58
  • 83
1
vote
3 answers

Shadow mapping with wrong results (HLSL, Shader model 3.0)

(Sorry for my bad English.) I'm new to Stack Overflow and writing a 3D game application with MS Visual C++ 2015 compiler, Direct3D 9 and HLSL(Shader model 3.0). I've implemented a deferred rendering logic with 4 render target textures. I stored…
1
vote
0 answers

Deferred Rendering Shadows Strange Behaviour (almost working, not acne)

I have a simple deferred rendering setup and I'm trying to get depth map shadows to work. I know that I have a simple error in my code because I can see the shadows working, but they seem to move and lose resolution when I move my camera. This is…
Majd Akar
  • 161
  • 4
1
vote
1 answer

Sample depth from shadow map without disabling hardware PCF

I have a shadow map with enabled hardware percentage-closer filtering. But I also need to get the depth value stored in the shadow map in order to use it for implementing other techniques in the pixel shader. The problem is that all sampling…
Homer
  • 11
  • 2
1
vote
2 answers

three.js: how to let transparent png sprites cast and receive shadows?

Is there a feature, option, or some shader, that allows sprites to cast and receive shadows? Also including that sprite's alpha channel is not rendered as a shadow. I have all my assets as transparent PNGs, and I am using sprites in three.js to map…
bitten
  • 2,463
  • 2
  • 25
  • 44
1
vote
1 answer

How to use QOpenGLFrameBufferObject for shadow mapping?

I am trying to render a scene (bike on a platform shown below) with shadow using Qt's OpenGL classes. Screenshot of bike model without shadows I realize that we would need to make two passes for this. The first pass for rendering a depth-map from…
1
vote
1 answer

Android NDK SDL2 OpenGL ES 2 shadow mapping (directional)- is it possible?

Trying to utilize directional shadow mapping on OpenGL. Need to generate a depth texture that isn't a renderbuffer (need to be able to read from it) it future passes. Keep getting GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT (as result of…
Phildo
  • 986
  • 2
  • 20
  • 36
1
vote
0 answers

combining lighting effects (specifically SSS)

I am working on a rendering program and I have several effects I need to combine together. I have shadow mapping, SSS, and wrap lighting as described here: http://http.developer.nvidia.com/GPUGems/gpugems_ch16.html How do I combine these effects?…
zumba man
  • 129
  • 1
  • 12
1
vote
1 answer

OpenGL - Rendering point light with cube shadow map?

I'm having trouble rendering cube shadow map. Negative and positive seem to be reversed and I can't figure out why. Tried to reverse targets and directions, but I get event weirder output. Code: // init glGenTextures(1,…
Radu
  • 169
  • 1
  • 11
1
vote
0 answers

Issues with subsequent texture read and write

In my rendering pipeline (OpenGL 3.3 core), I have a following cycle (pseudo-code): for 1..n: render to texture T bind texture T render to back buffer (with texture T sampled in the fragment shader) When n=1, everything is OK. However, when…
Lukas Z.
  • 483
  • 6
  • 14
1
vote
0 answers

Layered rendering of a shadow cubemap

I'm trying to render a shadow cubemap in one pass, using layered rendering. I've tried to be as thorough as possible : I have bound a cubemap both depth attachment (GL_DEPTH_ATTACHMENT_32F) and color attachment 0 (GL_R32F) using…
xtrium
  • 64
  • 6
1
vote
1 answer

PCF in cubemap (PCSS)

I’m following this paper in order to implement PCSS in my engine. I have a little problem though. My engine only permits omnidirectial lights up to now – I’ll add more later, but that’s not the question. So, in the first place, I implemented hard…
phaazon
  • 1,972
  • 15
  • 21