See Topic name. The Shadowmap hitting the model has all sorts of lighting issues, like the game
doesn't know exactly where the model is originating maybe?
I have an example wad all set up along with screenshots.
https://cdn.discordapp.com/attachments/ ... nknown.png
https://www.mediafire.com/file/si0q9k7d ... ponBug.pk3
AlsoIReallyLoveShadowmapsSoIfYouCouldEnableThemOnTwoSidedLinedefsThat'dBeJustGre-
Shadowmaps being weird with 3D weapon models
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Posts: 154
- Joined: Mon Aug 02, 2010 11:10 am
Re: Shadowmaps being weird with 3D weapon models
Ah, crap. Because the weapon sprite isn't drawn in its true world position the shadowmap lookup fails.
-
- Posts: 154
- Joined: Mon Aug 02, 2010 11:10 am
Re: Shadowmaps being weird with 3D weapon models
I take it that isn't exactly easy to correct? That's really too bad, gzdoom is pretty gorgeous right now. Once shadowmaps came out I begandpJudas wrote:Ah, crap. Because the weapon sprite isn't drawn in its true world position the shadowmap lookup fails.
to make one of the best looking mods out there, and I was looking forward to it. Besides this, bump mapping on 3d models(yes I'm aware
dynamic lights only would affect it) and shadowmaps only being used on one-sided linedefs I really cant complain at all for this port now.
Hope something can be done!
Re: Shadowmaps being weird with 3D weapon models
Thank you, glad you like the shadowmaps.
I managed to fix it, but it meant I had to repair some old code first. It should be working in the next nightly build.
I managed to fix it, but it meant I had to repair some old code first. It should be working in the next nightly build.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Shadowmaps being weird with 3D weapon models
Good to see that this positioning hack is gone. I never liked how this was implemented because it was nearly inevitable that it'd cause problems down the line.
Re: Shadowmaps being weird with 3D weapon models
Quick question (not being able to check myself at the moment): by "positioning it in the world", does that mean the HUD weapon model will clip into level geometry (as seen in almost every amateur Unreal Engine 4 game)?
Re: Shadowmaps being weird with 3D weapon models
No, it clears the zbuffer before drawing it.
Before my fix it was drawing the weapon with coordinates in view space (eye's perspective) with the camera pointing straight ahead at (0,0,0). Now it is drawing it in world space with the camera positioned correctly in the world. Visually you can't tell the difference, but it meant that pixelpos wasn't getting the proper values it needed to project into light shadowmap space.
Before my fix it was drawing the weapon with coordinates in view space (eye's perspective) with the camera pointing straight ahead at (0,0,0). Now it is drawing it in world space with the camera positioned correctly in the world. Visually you can't tell the difference, but it meant that pixelpos wasn't getting the proper values it needed to project into light shadowmap space.