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.

AppGameKit Classic Chat / [Possible Bug] Using Shadow Mode 3 but trying to not overwrite texture stage 4-7

Author
Message
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 26th Dec 2019 17:39 Edited at: 26th Dec 2019 17:52
I pass 5 images to a Quad object and use shadow mode 3 which overwrites stage 4 to 7.
So my onw textures at stage 4 and 5 get overwritten too.
Now I tried to prevent it using SetObjectReceiveShadow(QuadObjectID,0) which in my opinion should do the trick...but without success.

Can someone think of a way preventing mode 3 to overwrite my textures ?
Would you call it a bug ?
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 26th Dec 2019 20:15
Hi Janbo, Merry Xmas to you.

Yep this is a bug!

When an object mesh is drawn and the shadow mapping mode is set to 3 then texture stages 4,5,6,7 are all filled with a shadow map even if the object is set to NOT receive shadows. The shadow maps are not needed if the object itself isn't set to receive shadows so this is wrong.

I've changed the object code and added a check in C to see if the object is set to receive shadows and corrected it so you can use all the stages if wanted. I've attached an example project which uses stage 6 even though shadowmode 3 is enabled and with the extra code it works ok on my machine. Id suggest we add this as a bug to github so Paul can make the changes (its just 2 lines of code so is an easy change)

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 27th Dec 2019 04:47
Thank you, for the confirmation !
I'll add it to github.
Marry XMas

Login to post a reply

Server time is: 2024-04-18 02:26:43
Your offset time is: 2024-04-18 02:26:43