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 / Shader help? Works once. But if applied to another object - it fails.

Author
Message
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 28th Jul 2018 14:43 Edited at: 28th Jul 2018 14:51
I have a terrain splatmap shader that works fine once. But when I go to load the next level, it ignores the splatmap. It still applies some other details. Like when the player exits the playing area the texture turns a different color( I hope its like a neon yellowish). I have to wonder if I am making some silly mistake that I am overlooking.

I have attempted to delete the shader and reload it, but it still doesn't texture it correctly. Any ideas?

Function creating the terrain - works fine once, but then I can't create another terrain/level based off the splatmap.



Thank you.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 28th Jul 2018 19:02
Sounds a bit like you forgot to reset something before loading the new level.
Can you provide more infos ?
What are you Deleting/Loading/Resetting for the scene change ?
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 29th Jul 2018 16:51 Edited at: 29th Jul 2018 17:06
Hey janbo,

Code for leaving the scene and going to the world map:


Deleting the scene:


Dim global arrays function


function to load new area



LoadHome function



Function to create the terrain



Loading the map:
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 29th Jul 2018 19:07
home_grd is a global right ?
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 29th Jul 2018 20:01 Edited at: 29th Jul 2018 20:03
Yes sir. terrainshader is also.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 29th Jul 2018 20:12
Wow... don't I feel dumb. I forgot to turn ShadowMapping off. Works now. I knew I was overlooking something. Thank you, Janbo,.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 29th Jul 2018 20:37
Ah so you used texture stage 6 to 8 for your splatmap shader.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 29th Jul 2018 22:56
I didn't. But I was shadow mode 3, and using stages 4 and 5.

"When using shadow mode 3 (cascade shadows) then texture stages 4, 5, 6, and 7 are reserved for the shadow maps."
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 30th Jul 2018 11:21 Edited at: 30th Jul 2018 11:21
Of course I forgot, good I have my shaders in place already

Login to post a reply

Server time is: 2024-04-18 09:09:59
Your offset time is: 2024-04-18 09:09:59