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 / How will tgc solve the issue with nivida tegra 2 shaders?

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 12th Apr 2013 00:06 Edited at: 13th Apr 2013 12:07
There is no issue with agk but how nivida wants shaders written.
You cant pass user varyings in to the fragment shader but first the vertex shader and then send them from there to the fragment shader.
To this date do i only know about tegra 2 devices that neads this workaround............................
EDITED_____________________________________________


After alot of web browsing without much luck until i stumbled on a weird tegra shaders page and a small text.

It seams that shaders on tegra dont allow user varyings in the fragment shader?

I thought it sound silly but as my dungeon game shaders didt work and a i pass in an min and max value to get he right fog.

So did i try to simply create a Point light where i used its x coord for the min value and its y cord to pass in the max value.

And yes now does my shader work on even tegra devices

Does tgc have any plans on making some shader commands that are defined like the internal Point lights so we can use our own shaders with tegra devices also?
Now that we know that user varyings are not allowed on tegra fragment shaders.

Its funny wath you learn with getting a new device

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 12th Apr 2013 00:21 Edited at: 12th Apr 2013 00:24
After some more browsing and hard to find so can the vertex shader take user varyings.

If you use an value you want to calculate in the fragment shader.

Simply use an uniform to load it in to the vertex shader.

Then grabb it and send to the fragment shader with an varying.

Could be good to know for Another agk user intrested in shaders on android

And as a user note so does this only apply to nivida tegra 2 shaders that i know?
As they will not accept your user varyings if not done like this.
All other android devices gladly compiles and run shaders done the usual way with uservaryings passed in to the fragment shader.

Ps....
Yay my game runs on my galaxy tab 8.9 as it should now

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz

Login to post a reply

Server time is: 2024-05-04 13:47:20
Your offset time is: 2024-05-04 13:47:20