LightBlow Shader

I have added JME spotlight and JME ParallaxMapping to the lightblow shader from the lighting shader to get more JME features with this shader.



It is in the repository:

http://code.google.com/p/jme-glsl-shaders/

I added fog for LightBlow shader. Now fog can be used withot post-processing.



Fog to color.

Fog to skybox.



http://imageshack.us/photo/my-images/832/lightblowfog.jpg/

Texture Blending is added.

4 diffuse, 4 normals and specular are blended.



http://i.imgur.com/pBaSJ.jpg

4 Likes

Do you use texture array? or just 4 textures?

just 4 textures.



It looks like in TerrainLighing.

ok

Nice work :wink:

What the difference between texture array and simple texture mixing?

the amount of uniforms

Will it help to improve fps?

Now I have 8000 tris terrain and my fps is only 200-300fps.



My code is here:

http://code.google.com/p/jme-glsl-shaders/source/browse/#hg%2Fassets%2FShaders%2FLightBlow





And test scene:

http://code.google.com/p/jme-glsl-shaders/source/browse/src/LightBlow/LightBlow_Terrain_System.java





Can you give me a hint how I can improve the shader?

Been taking a look at the code and assets. I noticed your diffuse textures are black/white. How do you get color on the textures? Are the polygons colored in the blend model?

diffuse textures have alpha channel. Possibly, your image viewer shows alpha as black. All textures are rgba. Colored.

I have added Color Multiplication to th LightBlow.



http://i.imgur.com/1xcO8.jpg

1 Like

Any chance this can be changed to BSD license the same as the rest of JME3? GPL sadly precludes use in a closed source game :frowning:

MAN!! Just take this shader and do what you want! NO LIMITS. :slight_smile:



I changed the license.

2 Likes
@mifth said:
MAN!! Just take this shader and do what you want! NO LIMITS. :)

I changed the license.


Awesome, thank you :)

GPL is a really annoying license cos its the "default" for most open source projects/hosting, but if you're trying to make a game that's closed source like I am (even if just to prevent bots, hacks and blatant clones appearing within hours of releasing it) you can't use anything released under it. BSD license is truly free and open.

Thanks for sharing your work, this is the best lighting shader I've seen for JME so far!

I have merged ToonBlow and LightBlow shaders. Now ToonBlow is part of LightBlow shader. I also added color edges and fog parameters for edges.



http://i.imgur.com/6y5F9.png



You can grab the shader and examples in the Mercurial repository.

Somehow these shaders seem to have bugs that are not seen on some graphics cards on windows: http://hub.jmonkeyengine.org/groups/beta-1-game-contest/forum/topic/wip-arcade-style-airplane-game-contest-entry/?topic_page=3&num=15#post-151854

What is “Left-hand-side of assignment must not be read-only Shaders/FakeParticleBlow/FakeParticleBlow.vert”? Can it be because of file access?



Actually, there is nothing special in this vertex shader: http://code.google.com/p/jme-glsl-shaders/source/browse/assets/Shaders/FakeParticleBlow/FakeParticleBlow.vert

Obviously you are writing to a read-only variable…

you cannot assign g_Time (“g_Time * = m_TimeSpeed;”) because it’s an uniform, use a temp variable.