TechDemo to use Pixel Shader with AppGameKit 1089
Source:
http://www.iquilezles.org/
Shader Tool:
http://www.iquilezles.org/apps/shadertoy/index.html
AGK [Tier 1]
dw = GetDeviceWidth()
dh = GetDeviceHeight()
SetVirtualResolution( dw , dh )
SetSyncRate(0, 1)
SetCameraPosition( 1, 0, 0, -1 )
SetCameraLookAt( 1, 0, 0, 0, 0 )
CreateObjectPlane(1, dw, dh)
LoadMusic( 1, "music.mp3" )
PlayMusic( 1, 1)
AddVirtualButton( 1, dw - 50, dh - 50, 64 )
SetVirtualButtonColor( 1, 0, 0, 0 )
SetVirtualButtonAlpha( 1, 99 )
SetVirtualButtonText( 1, "NEXT" )
for i = 1 to 7
LoadShader( i, "vertex.vs", Str(i) + ".ps" )
SetObjectShader( 1, i )
SetShaderConstantByName( i, "resolution", dw , dh, 0, 0 )
repeat
SetShaderConstantByName( i, "time", Timer(), 0, 0, 0 )
Sync()
until GetVirtualButtonReleased( 1 ) = 1
SetObjectShader( 1, 0 )
next i
end
If it to slow change the setup.agc Fullscreen mode.
Have fun!