Comments (10)
no problem :D i am just so excited that i finally can relax on the whole shadow mapping part of my engine :D i have also made it work with my own scripts so i don't use yours for the engine ;-) i hope you got some rest btw :)
from learnopengl.
i have a picture of what i mean here:
http://nutcrackz.com/shadowmapping.png
from learnopengl.
Without any images it's difficult to figure out what's wrong (edit: I see you just posted a new comment with an image, disregard this sentence) . Then some source code might also be useful and did you check the following:
- first display your shadow depth map directly to the screen, if this looks wrong you know the issue is in your shadow map generation.
- adjust bias?
- adjusted the orthographic frustum to encompass all objects in your scene.
from learnopengl.
Here is the link to the gist:
https://gist.github.com/standtall007/54a9211dd91920f5c091f89e73f0ccaf
the near and far plane i have in the header of this script! they are set to : near_plane = 1.0f; far_plane = 7.5f;
Thank you for informing me of gist, i honestly don't know why on earth github wouldn't make the code look proper...
from learnopengl.
adjusted the orthographic frustum to encompass all objects in your scene?
i have never been good at understanding the frustum meaning, but do you basically mean the camera's position?
first display your shadow depth map directly to the screen, if this looks wrong you know the issue is in your shadow map generation.
This is easy to answer since when i had it to render on the entire screen it simply shows black, and nothing else, but i am lost when it comes to solve it... i don't know if it has something to do that i'm using wxWidgets as my window?
from learnopengl.
Please format your code (right now it's just a mess on GitHub), or use something like https://gist.github.com/
from learnopengl.
Hi Joey i have just updated the code to be used on gist instead please look at the link :)
from learnopengl.
Hi Joey, i have just been tinkering with the code (mostly removed comments and reverted some code that didn't change anything on the screen anyway!) and i can now see the depthMap (or rather some of it) when i render the quad! but the shadow in the depth map (or the blackness if you want) is static it doesn't follow the camera, or it doesn't change position inside the quad... i will gladly send you a screenshot :)
here is the screenshot: http://nutcrackz.com/shadowmapping2.png
i have also tried to tinker with the projCoords in the fragment shader, i have tried to change the z coord to both x and y, it does change the shadow position and rotation but it still does not look right...
from learnopengl.
Hi Joey, i want to thank you for making me try harder even if you're still asleep :) i have FINALLY gotten it to work that to the way you wrote the things :D i didn't take it as a kick in the crotch, but instead it encouraged me to try all night to get it to work :) and now it does, so Thank you very much!
Cheers, and i am looking forward to your next tutorial ;-)
from learnopengl.
Haha great to hear and yes I was asleep, sorry :) Great that you managed to fix it, best of luck!
from learnopengl.
Related Issues (20)
- Confused by your explanation of "irradiance map"
- Maths in parallax occlusion mapping shader.
- PBR Bloom: clarify that bloom happens due to diffraction, not scattering. HOT 3
- Website is Down HOT 6
- Model: not loading textures
- Ad is in an annoying place HOT 10
- mismatched header files and libs causes seg fault HOT 2
- glad is no longer down HOT 1
- Segfault at introduction to textures chapter, fix attached HOT 3
- The blur effect on Mac will error
- Getting it working with Win32 (having troubles with the libraries, probably Assimp)
- Basic rendering problem HOT 1
- Camera exercise 2 comment nitpick
- Does this project only support Intel architecture and not arm64?
- Shadow Shimmering Problem
- Why can't it be rendered after loading my own obj file?
- comment has bad grammar
- 8.guest_2020_skeletal_animation crash
- 2.lighting/2.4.basic_lighting_exercise2 /basic_lighting_exercise2.cpp Phong shading in view space
- Motivation: rewrite the codebase in Rust HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learnopengl.