Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / hardware shadows, a bug???

Author
Message
aprilfan
23
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Hell
Posted: 30th Apr 2003 00:18
My hardware shadows created by, "set shadow mapping on" are inverted when I walk into them. That is to say everything that was shadowed, isn't and everything that wasn't shadowed, is. Why is this, could it be another bug, or just something I'm doing wrong. I hope its my fault as the Shadows are beautiful! And I have a whopping 65 FPS even though every object in the game has an ultra cool shadow! So me or Darkbasic if this has happened to you I'd like to know! Thanks in advance!

ps- my game is an FPS where camera moves on a matrix with get ground hight, just in case you wanted to know.
We could have handled that better.
The Wendigo
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 30th Apr 2003 01:24
Yep, I got the same problem. Dunno a solutions yet, but I've been working on it. I will tell you this, for objects such as buildinge and trees and stuff, I just simply change the Matrix Normals to darken where a shodow should be. The method I wrote is actually ray casted but I'm sure you could just as easily find the Tile under the Object and change its normals. I think It could be done like this:



This should also add a few more frame cycles (as long as you don't do this during game runtime) so precalc this stuff above your do loop or one time when you load a building.
This code is completely un-tested, also you might try putting in different numbers for the -1 that are between the range of -1 and 1. I can't remember which shades and which brightens. Hope that helps and I hope DBP does something about Projected shadows. I'm pretty sure it is DB because Operation Flashpoint also has shadows and is an FPS (same kind of shadows as far as i can tell) and that glitch doesn't appear.

<<Insert signature here>
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Apr 2003 01:25
Chainer, please post some source code and relevant media, but I certainly haven't had this problem.

Current Project: Retro Compo. Entry.
aprilfan
23
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Hell
Posted: 1st May 2003 04:21
I'm sorry that I can't provide you with some source and media but the files are to large to many and I don't want to rewrite it so...just forget about it. PS your little function didn't work and it dosn't matter to much I'll deal with it thanks! Shadows just aren't that important....right?

We could have handled that better.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st May 2003 19:00
What I meant is just post a short sample showing the problem, not all of your code.

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"

Login to post a reply

Server time is: 2026-07-11 06:07:03
Your offset time is: 2026-07-11 06:07:03