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 / Im after some help with some shader conversion thanks

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 4th Sep 2018 11:05 Edited at: 4th Sep 2018 11:07
Question I have this 2D Shader which works



And I have been trying to convert to a 3D shader but get the error that gl_FragColor is not reachable in vs shader at line 25

this is the vs shader



the ps shader to hopefully match



Any help would be greatly appreciated
fubar
puzzler2018
User Banned
Posted: 4th Sep 2018 12:52 Edited at: 4th Sep 2018 12:54
Where does the variable "norm" come from?

Maybe you require

mediump vec3 norm = normalize(normalVarying);

in the VS


fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 4th Sep 2018 12:58 Edited at: 4th Sep 2018 20:28
All good I worked it out

vs shader



ps code
fubar

Login to post a reply

Server time is: 2024-04-24 08:36:29
Your offset time is: 2024-04-24 08:36:29