Location of plant shader in game files?

Post Reply
redruin
Posts: 1
Joined: Wed Oct 25, 2017 1:17 pm

Location of plant shader in game files?

Post by redruin » Mon Oct 30, 2017 9:03 pm

New buyer here. Having a blast so far with the game, and I want to get in on the modding scene, but I'm having trouble finding a specific shader, "plant.vert/frag" (It's used in plant objects and flag/banner objects). This shader does not appear in "Overgrowth/Data/GLSL" and I cannot find it anywhere else in the game's directory. I noticed while searching that this shader only appears on the legacy threads, and I was wondering where it went, or even if it is still editable.

Image

Specifically, I want to create a new shader that moves the cloth of flags and banners in a more realistic way, but in order to do that I'd have to know exactly how Overgrowth handles the various maps and how it moves the vertices of the object, which is why I'd like to take a look at the original.

If the file can no longer be edited, is there anyone that can post a copy from an earlier version, just so that I can get a feel for what the shader does? Or, maybe, if it got concatenated onto another, more general file, can someone tell me which file it is?

Image
Here's a list of all the files in my GLSL folder.

Any further tips on making custom shaders are also appreciated for a beginner like me.

Thanks

User avatar
edoantonioco
Posts: 66
Joined: Wed Jan 08, 2014 8:09 pm

Re: Location of plant shader in game files?

Post by edoantonioco » Sun Jan 28, 2018 7:48 pm

http://wiki.wolfire.com/index.php/Shader_Creation

Many cool things can be done with shaders, I hope you can modify the plant shader to make your own version of it.

But there are also flags on the game, you may want to take a look at what shaders those banners are using.

merlyn
Posts: 373
Joined: Fri Aug 26, 2016 2:41 pm
Contact:

Re: Location of plant shader in game files?

Post by merlyn » Mon Jan 29, 2018 6:32 pm

I went through and filled out more of that page.

TL;DR - the plant shader is actually "envobject #TANGENT #ALPHA #PLANT"

If you want to edit the plant shader, you'll have to edit envobject.vert and envobject.frag, specifically the sections inside #ifdef PLANT, #ifdef ALPHA, and #ifdef TANGENT blocks (or #if defined(...) for those three).

Post Reply