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 / [SOLVED] Shader pack problems

Author
Message
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 17th Apr 2023 19:03 Edited at: 17th Apr 2023 19:22
Ok so I tried and tried understanding this but it just does not load or execute

Compiling C:/FPS Movement
Error: Failed to open file "C:/FPS Movement/Templates/ShaderPack/Includes/ShaderPack.agc" for reading
Compilation failed.

I even placed it like instructed and still tells me it can not open to read file.

#include "Templates\ShaderPack\Includes\ShaderPack.agc"

I even did this and nothing.

#include ".\..\Templates\ShaderPack\Includes\ShaderPack.agc"

The files is in my projects folder so i do not understand.

The author of this post has marked a post as an answer.

Go to answer

Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 25th Apr 2023 21:19
Another thing i do not like is not being able to use my own sync.

My game has to be at a sync rate.

SP_Sync() // Use SP_Sync() instead of sync()
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 26th Apr 2023 12:20 Edited at: 26th Apr 2023 12:29
This post has been marked by the post author as the answer.
The following I find as a better solution - do not alter the installed Shader Pack stuff but alter copied versions of anything otherwisse you will have to reinstall the shader pack;

For my projects I have my Includes folder in the same location as the exe.
I then change the #include ".\..\Templates\ShaderPack\Includes\ShaderPack.agc" to #include "Includes\ShaderPack.agc".
Then in the ShaderPack.agc file there is ONLY a list of of #includes that are all similarly written with.\..\Templates\Shader Pack\ followed by the other include file names.
Likewise I change those all to read as "Includes\" followed by the file names at the end.

Then all that needs doing is to decide whether you will be using the readable shader files or the encrypted shader files. The readable shader files are all in the Shader Raw folder(these are the ones you can edit in notepad for example and have either the ".vs" or ".ps" file suffix) and the encrypted versions of them are in the Shader folder(all with either the ".vc"" or ".pc" file suffix) - both of these folders are in the Shader Pack folder alongside the Includes folder ie all in the Templates folder. The encrypted files are the ones you ship with your game/app. If you end up editing the Raw versions there is code provided in the pack to convert them. Which ever you choose to use, just copy the folder over into your projects media folder - if you choose to use the editable versions then the folder "Shader Raw" simply needs renaming to just "Shader".

That is all that needs doing, the pack itself is set up so that all the example projects use the same Templates folder location. I find the above way works best so that I can move my projects where ever I want and any backups I make can be compiled from whatever location they are situated. This way I can edit any readable shader files per project rather than forcing every project to use any changes I make.

As for the sync issue, only the sync rate command will change the target sync rate and this will work regardless if sync or SP_Sync is used, for the shader pack to work as-is then you MUST use SP_Sync. You should consider that as set in stone - the shader pack is a system, if you want to use them as not part of the system then you must work that out for yourself but only once you are familiar with how shaders work AND how AppGameKit folder usage works with commands - which you are not quite ready for as best as I can tell - BUT follow the above and you should be good to go.
Win 10 Home 64, Intel(R) Core(TM) i5-10300H, 8GB DDR4, NVidia GeForce GTX 1650 4GB GDDR6
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 26th Apr 2023 13:31
It works now and thank you, It is working better than i thought.


Login to post a reply

Server time is: 2024-11-23 08:22:48
Your offset time is: 2024-11-23 08:22:48