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 / problems with shader kit

Author
Message
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 23rd Feb 2018 20:41 Edited at: 24th Feb 2018 16:40
hi,just purchased the shader kit for use with my 3D engine, looked at demos and included/changed what I needed to in my editor, but when I come to apply a shader to a selected object I get an error,
here is a video showing this error:



the code to try and set the shader to the object is this:


object[n].ID is obviously where the objects ID is stored and object[n].im the image, I supposed this is how I called the shader stuff

the demos that come along with the shaders work fine so I have no idea why


I am using
SP_Init()
SP_SetClearColor(0,128,255)

in my init function before all of this and have replaced all sync commands
Hail to the king, baby!
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 24th Feb 2018 09:05
your vid is gone...
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 24th Feb 2018 10:29
huh? tis playing here
Hail to the king, baby!
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 24th Feb 2018 12:03
Your video don't work. Maybe it is in private mode ?
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 24th Feb 2018 16:41
how about now?
Hail to the king, baby!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Feb 2018 00:25 Edited at: 25th Feb 2018 00:29
Because I can not think of a solution directly, I would suggest you to comment one command at a time, to check which one is causing the trouble.
Maybe also set the "generate softnormals" flag to zero just for testing.

You are not deleting the objects or use any custom shaders, right ?
But if the red marker indicates deleting objects you may want to call SP_Outline_RemoveObject(ObjectID) and SP_Toon_RemoveObject(ObjectID) before you call the DeleteObject(ObjectID) Command
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 25th Feb 2018 07:42 Edited at: 25th Feb 2018 07:44
not deleting a thing,they just get selected/deselected , if i press del when they are selected then yes, but I press X instead to apply shader to selected, it errors with everything to do with the shaders,including adding the fullscreen shaders to my project,the only thing that does work in it all under my engine is the custom skybox
Hail to the king, baby!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Feb 2018 11:23
So the demo projects work, but as soon as you try a shader in your own project it fails.
Should mean your device is capable to run the effects, but your project is doing something that interferes with them.
Can you recreate the error in a small demo ? maybe make a copy of your project and strip it down till you don't get the error anymore.
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 25th Feb 2018 13:20
looks like that is all I can do,its really odd, I can do operations on selected objects like change all selected objects texture... so I know the texturing on my part is fine
Hail to the king, baby!
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 25th Feb 2018 14:04 Edited at: 25th Feb 2018 14:05
dumb question: have you put a copy of the shaders in your media folder? And the other folder is in your projects root? and you have the sync command exchanged by SP_Sync() at the end of your loop?
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Feb 2018 14:08
I came across a really odd shader issue......left a varying in the fragment shader that isn't used anymore, no longer in the vs shader. On my desktop no bother, seemed to be ignored. On my laptop, failed to compile shader every time.

So what kind of hardware are you running on?
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 25th Feb 2018 14:54 Edited at: 25th Feb 2018 15:11
ah never mind..I had forgotten to put the shaders dir into the projects media folder, got some success, the glass works, but if i try the wireframe or outline then makes all my objects vanish... here is the glass effect working:





will have to try em all and see whats works and what doesn't, and why...
Hail to the king, baby!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Feb 2018 17:40
Just a quick tip: it seems that you are not updating the environment map after you build the level.
You may want to call SP_Environment_Render(EnvironmentID) once after you finished building the level so the map catches the whole "environment".
I say this because the the glass is very green, this could also be caused by a wrong eta value passed to the shader, but I guess you are not playing with it yet.
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 25th Feb 2018 18:03
Yes you are right, tnx for that tip.
Hail to the king, baby!

Login to post a reply

Server time is: 2024-04-25 06:14:12
Your offset time is: 2024-04-25 06:14:12