Product Chat / modify shader on runtime

Author
Message
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 30th Sep 2019 23:11
how Game Guru allows to modify shader values during game play on runtime to make creepy blurring effects and other stuffs possible?
we have to set specific zones for this to happen?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th Sep 2019 23:13
with lua so yes you can use zones to trigger effects
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 1st Oct 2019 08:06
thanks for oyur reply.. so i i for e.g want a specific effevt i need to create a script that run the specific effect and then place it in a trigger zone to have the effect loaded?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 1st Oct 2019 15:44
You will have to change, compile and test the shader to do the effect you desire. Then it can be triggered by a lua call within a script that could be startted via a zone.

If you just want blurring there are already lua commands built in that will do this via the post process shaders.

Cheers.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 1st Oct 2019 16:02
ok but if i modify the shader and recompile it .. the original shader will not exist more.. do i need to make a copy of the original shader , rename it, modify and after recompile to not lost the original?'
i really cant undestrand this is there any example to be used as template?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 1st Oct 2019 19:33
Probably best to do that yes. Depending on what you change if not done correctly you can get a green screen, crash or just fail to compile errors. I think there was an example somewhere - something to do with chromatic aberration effect.

Updating shaders is a topic in its own right - there are lots of web snippets and books on it though.

Cheers.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 2nd Oct 2019 00:11
ye but i gg could have a better way to maange thme ..maybe in the editor itsself.. and we need many of them... sahders are stuffs that make games looks good .. and we miss them too ..with missed lightning and dynamic shadows that makegg games to fell really ugly.. for the most part LOL
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 2nd Oct 2019 07:00
Yes I agree that shadows from dynamic lights is a necessary missing feature.

I don’t think Shader management or editing could be made much easier - it’s an advanced game topic. Unity helps by abstracting a lot of core functions that all shaders use but still needs practice and experience to create new shader effects and in some other engines the shader pipeline is closed whereas in GG it is completely open if you understand HLSL.

Updating the post process shaders in GG is the easiest first step I think. Have a look at those (post-bloom.fx and post-sao.fx) and see how they operate and start with very gentle changes and you may get hooked on shader dev . Notepad++ is great for HLSL editing.

Cheers.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 2nd Oct 2019 07:03
many thanks again for your explaination and help--- i 'll give a look asap
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM

Login to post a reply

Server time is: 2024-11-23 22:19:27
Your offset time is: 2024-11-23 22:19:27