How to customize a .frag file?

Hi,

I want to make customizations on the HeightBasedTerrain.frag file for test purposes. Where can I find this file? I’m using the jMonkeEngine SDK.

Greetings

PS:

I want to make customizations on the HeightBasedTerrain.frag file
Could I achieve this with shader nodes?

In theory shader nodes would be the way to do that, they are still a work in progress though and so far as I know terrain hasn’t been converted.

You can find the frag and vert files for all the standard shaders if you look in the SVN repository for jME3.

1 Like

Alright, thanks!
Where can I then exchange my customized file with the original? The engine is only available in jar files within the sdk, isn’t it?

<cite>@Hot-Chip said:</cite> Alright, thanks! Where can I then exchange my customized file with the original? The engine is only available in jar files within the sdk, isn't it?

You may want to go through the tutorials but at a minimum, you should probably read the linked docs in the “Materials, Light, Shadow” of this page: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3

1 Like

Create a brand new shader and then a new material type using that shader. Use the existing shader’s from the svn as starting points for making your own.

Take a look at the materials and shader tutorials for more details.