Jump to content

[LE3] Hybrid shaders for testing.


shadmar
 Share

Recommended Posts

Here are some Hybrid shaders if anyone wants to give it a spin, they support, both lightmaps and dynamic lights, they are not perfect, but feel free to experiment. (not for mobile)

hyrid.PNG

 

Material lightmode : static

 

Material texture layout shoud be like this :

you only need the ones for the shader selected, like diffuse+specular.shader only use 0 and 2.. and so on...

 

0=diffuse

1=normalmap

2=specular map

3=(default lightmap found in Common)

4=envmap (needs to be a cubemap created in the editor)

5=glowmap

 

Fog

They also support fog.. but..

It requires you to send color and density values (or you can hardcode it in shader).

it's a vec4(float r, float g, float b, float density)

 

So the quick way would be to set it directly in shader :

fog = vec4(1.0,1.0,1.0,0.035); //somewhere in void main()

 

But the correct way is to send it as an uniform through the application using shader:SetVec4(..)

 

They will also work with a Gile a lightmap using the second UV channel, just assign the lightmap to texture3 in material.

HybridShaders.zip

  • Upvote 4

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Material look same as in game.

only some parts specific should glow , perhaps black color on glow would do nothing and these parts would just look like diffuse shader;

and white parts would glow at maximum ?

Perhaps more simple, only White color on the glow map would glow ? (with some treshold?)

 

495981-tron-evolution-windows-screenshot-you-start-the-game-as-usual.png

Stop toying and make games

Link to comment
Share on other sites

Glowmap lits up bright colors and does nothing with black, if that was your question?

You can do Tron effects like that, but without the blurring bloom. (you need postprocessing for that which isn't supported yet)

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Shad, One thing ive noticed whilst using these is that the material intensity is alot darker than the default leadwerks shaders, is there a reason for this, or can they be matched somehow?

 

I ask because im finding odd things (and i know these are experimental) but im finding the light map rendered in the viewport at edit time doesnt represent what you see at runtime, which makes things a little difficult.

 

Thanks

Andy

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

 

Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...