Jump to content

Specular map not working 2 :


YouGroove
 Share

Recommended Posts

Well this si same as first post:

http://www.leadwerks.com/werkspace/topic/7222-specular-on-full/page__hl__specular%20shader#entry59794

 

The specular texture bitmap is not taken account even with last update.

 

Example test : he white parts on specular map (belt and others) just have no specular effect in 3D view

specular_not_ok.jpg

 

After readin shader code , it's normal cau there is no specular texture taken account (no sampler2D texture)

//Uniforms
uniform sampler2D texture0;//diffuse map
uniform sampler2D texture1;//light map
uniform vec4 materialcolorspecular;

 

vec4 color_specular = materialcolorspecular;
lighting_specular += pow(clamp(-dot(lightreflection,nscreencoord),0.0,1.0),20.0) * attenuation * lightspecular[i]; 

 

 

Even shadmar help didn't made it on the old post.

 

---------------------

 

Wo we need some shader Guru laugh.png

(Even if it is not so hard to to as there is lot of specular examples over internet)

Stop toying and make games

Link to comment
Share on other sites

Two things:

  1. The goblin material does not use the specular shader.
     
  2. The goblin material has a specular color of 0,0,0,0. There's not really any reason for this, so I changed it to 1,1,1,1, though it still uses the plain normal map material without specular reflection. You can change this by setting the material's shader to diffuse+normal+specular.shader.

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...