Git Product home page Git Product logo

Comments (10)

VagueLobster avatar VagueLobster commented on June 15, 2024 1

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.

VagueLobster avatar VagueLobster commented on June 15, 2024

i have a picture of what i mean here:
http://nutcrackz.com/shadowmapping.png

from learnopengl.

JoeyDeVries avatar JoeyDeVries commented on June 15, 2024

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.

VagueLobster avatar VagueLobster commented on June 15, 2024

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.

VagueLobster avatar VagueLobster commented on June 15, 2024

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.

JoeyDeVries avatar JoeyDeVries commented on June 15, 2024

Please format your code (right now it's just a mess on GitHub), or use something like https://gist.github.com/

from learnopengl.

VagueLobster avatar VagueLobster commented on June 15, 2024

Hi Joey i have just updated the code to be used on gist instead please look at the link :)

from learnopengl.

VagueLobster avatar VagueLobster commented on June 15, 2024

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.

VagueLobster avatar VagueLobster commented on June 15, 2024

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.

JoeyDeVries avatar JoeyDeVries commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.