Low Poly Flat Shaded Shader

Hello Everyone,

I am curious if anyone has a shader laying around that they wouldn’t mind sharing that produces water that looks like this http://www.battlemaze.com/?p=153 I am very new with shaders so any help would be appreciated. Or some direction on how to convert the unity shader in the link into a jmonkey shader would be awesome.


The linked post shows already the whole shader. You only have to convert it to the jme format:
The frag-function becomes the fragment shader file, the geom-function the geometry shader and the vert-function the vertex shader. The needed material properties are listed in the first 10 lines.

I think, the only difficulty is to switch the variable names to match the requirements of jme.
For example _Object2World would become g_WorldMatrix and so on.
Have a look at https://jmonkeyengine.github.io/wiki/jme3/advanced/material_specification.html and https://jmonkeyengine.github.io/wiki/jme3/advanced/jme3_shaders.html .


Thanks for your help @shamanDevel, I didn’t end up using that linked shader I wasn’t able to get the geometry shader to work (I assume due to my inexperience with shaders) but with @Empire_Phoenix’s help on the irc channel I got it working. https://i.sli.mg/HBdhRe.png

Can you post the code in the contribution section? I think this would be useful for many people.

I was thinking about that, I’ll put something together for the contribution section. Thanks!