zoombapup wrote:
I was wondering if anyone else had fiddled around with this? easy enough to feed the specular mask into the calcPhongSpotlight function from a texture. But for some reason it doesn't seem to help specular wise.
I used a specular map for the head of my character with "okayish" results.
code in [[FS_LIGHTING]]
Code:
#ifdef _F06_SpecularMapping
uniform sampler2D specularMap;
#endif
.
.
.
#ifdef _F06_SpecularMapping
vec3 specMap = texture2D( specularMap, newCoords.st ).rgb;
float specExponent = specMap.r;
float specularMask = specMap.g;
gl_FragColor.rgb =
calcPhongSpotLight( newPos, normalize( normal ), albedo.rgb, specularMask, specExponent * 255, -vsPos.z, 0.3 );
#else
gl_FragColor.rgb =
calcPhongSpotLight( newPos, normalize( normal ), albedo.rgb, specParams.x, specParams.y, -vsPos.z, 0.3 );
#endif
huuuuuge map:
https://hcm-lab.de/public/Horde3D/trunk ... r_head.jpgresult:
On specular in general, with nice pictures:
Everything is ShinyEverything has Fresnel