Originally Posted By: jumpman
Im assuming here is the correct line to add the multiplication?:

float Specular = pow(saturate(dot(R, normalize(InViewDir))), SpecularPower) * SpecularIntensity * shininess;

correct

Originally Posted By: jumpman
Do I have to define the entskin storing the alpha texture? Say I have it on entskin3. I put this on the top of the fx file?:

texture entSkin1; // diffuse
texture entskin3; //shiny map

sampler ShinyMapSampler = sampler_state
{
Texture = <entSkin3>;
AddressU = Clamp;
AddressV = Clamp;
}

correct. There are more parameter in a sampler_state that you can configure (linear interpolation and such).

Originally Posted By: jumpman
How then do I multiply each pixel of skin3 into that lighting equation?

shininess = texture2D(uSpecularMapSampler, vec2(vTextureCoord.s, vTextureCoord.t)).r * 255.0;

that doesnt work for me, I got that from a website trying to do it myself.


that code line should be like this:

Code:
float shininess = tex2D ( ShinyMapSampler, inTex ).r;



Salud!

edited____
late!

Last edited by txesmi; 08/24/17 17:17.