my bad

its kinda crazy but does what I need sort of

original vert

[java]varying vec3 vLight;

varying vec4 vDiff;

varying vec4 vView;

varying vec3 vNormal;

varying vec4 vMat;

varying vec2 texCoord0;

attribute vec3 modelTangent;

uniform int numLights;

varying vec3 viewDirection;

varying vec3 lightDirections[1];

varying vec2 texcoords;

void main()

{

gl_Position = ftransform();

texcoords = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;

/* Get view and light directions in viewspace */*

vec3 localViewDirection = -(gl_ModelViewMatrix * gl_Vertex).xyz;

/ Calculate tangent info - stored in attributes */*

vec3 normal = gl_NormalMatrix * gl_Normal;

vec3 tangent = gl_NormalMatrix * modelTangent;

vec3 binormal = cross( normal, tangent );

/ Transform localViewDirection into texture space */*

viewDirection.x = dot( tangent, localViewDirection );

viewDirection.y = dot( binormal, localViewDirection );

viewDirection.z = dot( normal, localViewDirection );

for(int i = 0; i < 1; i++) {

vec3 localLightDirection = gl_LightSource*.position.xyz + localViewDirection;*

lightDirections*.x = dot( tangent, localLightDirection );*

lightDirections*.y = dot( binormal, localLightDirection );*

lightDirections*.z = dot( normal, localLightDirection );*

lightDirections* = normalize( lightDirections** );*

} // for

vec3 vtx =(gl_ModelViewMatrix * gl_Vertex).xyz;

vLight = (gl_LightSource[0].position).xyz - vtx;

//texture

texCoord0 = gl_MultiTexCoord0.xy;

vView = gl_Vertex - gl_ModelViewMatrix[3];

vNormal = gl_NormalMatrix * gl_Normal;

vMat = gl_Color * gl_LightSource[0].diffuse;

gl_Position = ftransform();

}[/java]

original frag

[java]varying vec3 vLight;

varying vec4 vDiff;

varying vec3 vNormal;

varying vec4 vMat;

varying vec2 texCoord0;

varying vec3 viewDirection;

varying vec3 lightDirections[1];

uniform sampler2D colorMap;

uniform sampler2D specularMap;

uniform sampler2D normalMap;

uniform vec4 vWidths;

uniform vec4 noiseMod;

uniform vec4 vWidthFactor;

uniform float m_Time;

uniform float m_Strength;

uniform float blend;

uniform vec4 Material;

void main(){

vec3 vNorm = normalize(vNormal);

vec4 vColour = vMat;

vec3 vLightN = normalize(vLight);

float x = (texCoord0.x+4.0) * (texCoord0.y+4.0) * (m_Time*10.0);*

vec4 grain = vec4(mod((mod(x, 13.0) + 1.0) * (mod(x, 123.0) + 1.0), 0.01)-0.005) * m_Strength;

float ndotl = dot(vNorm, vLightN);

vec4 base0 = texture2D(colorMap, texCoord0);

//gl_FragColor = base0 * gl_FrontMaterial.diffuse;

vColour *=mix(vWidthFactor.x+(grain*noiseMod.x), vec4(1.0), step(vWidths.x,ndotl ));

vColour *=mix(vWidthFactor.y+(grain*noiseMod.y), vec4(1.0), step(vWidths.y,ndotl ));

vColour *=mix(vWidthFactor.z+(grain*noiseMod.z), vec4(1.0), step(vWidths.z,ndotl ));

vColour *=mix(vWidthFactor.w+(grain*noiseMod.w), vec4(1.0), step(vWidths.w,ndotl ));

float lum = dot(base0.rgb, vec3(0.299, 0.587, 0.114));

vec4 gray = vec4(lum, lum, lum, base0.a);

gl_FragColor = mix(base0, gray, blend);

gl_FragColor *= ((mix(base0, gray, blend) + vColour) * gl_FrontMaterial.diffuse)* Material;

/* Extract colors from baseMap and specularMap */*

//vec4 baseColor = texture2D( baseMap, texcoords );

vec3 normal = normalize( ( texture2D( normalMap, texCoord0 ).xyz * 2.0 ) - 1.0 );

vec4 specularColor = texture2D( specularMap, texCoord0 );

vec3 normalizedViewDirection = normalize( viewDirection );

/ Sum up lighting models with OpenGL provided light/material properties */

vec4 totalAmbient = gl_LightModel.ambient * gl_FrontMaterial.ambient; // init with global ambient

vec4 totalDiffuse;

vec4 totalSpecular;

//

LIGHTS

for(int i = 0; i < 1; i++) {

vec3 normalizedLightDirection = normalize( lightDirections

* );*

float NDotL = dot( normal, normalizedLightDirection );

vec3 reflection = normalize( ( ( 2.0 * normal ) * NDotL ) - normalizedLightDirection );

/* Sum up lighting models with OpenGL provided light/material properties */

totalAmbient += gl_FrontLightProduct*.ambient;*

totalDiffuse += clamp( gl_FrontLightProduct*.diffuse * max( 0.0, NDotL ), 0.0, 1.0 );*

totalSpecular += gl_FrontLightProduct*.specular * specularColor * ( pow( max( 0.0, dot( reflection, normalizedViewDirection ) ), gl_FrontMaterial.shininess ) );*

} // for

/* Set final pixel color as sum of lighting models */

gl_FragColor *= (totalAmbient * base0 + totalDiffuse * base0 + totalSpecular)*2.5;

gl_FragColor += (((mix(base0, gray, blend) + vColour) * gl_FrontMaterial.diffuse * Material)*(totalAmbient * base0 + totalDiffuse * base0 + totalSpecular) )*0.75;

}

[/java]

attempted Ports

vert

[java]varying vec3 vLight;

varying vec4 vDiff;

varying vec4 vView;

varying vec3 vNormal;

varying vec4 vMat;

varying vec2 texCoord0;

attribute vec3 modelTangent;

attribute vec3 inPosition;

attribute vec4 inTexCoord;

attribute vec4 inColor;

attribute vec3 inNormal;

uniform mat4 g_WorldViewProjectionMatrix;

uniform mat3 g_NormalMatrix;

uniform mat3 g_WorldViewMatrix[];

varying vec3 viewDirection;

varying vec3 lightDirections[1];

varying vec2 texcoords;

void main()

{

gl_Position = ftransform();

texcoords = (gl_TextureMatrix[0] * inTexCoord).xy;

/* Get view and light directions in viewspace */

vec3 localViewDirection = -(g_WorldViewMatrix * inPosition).xyz;

/* Calculate tangent info - stored in attributes */

vec3 normal = g_NormalMatrix * inNormal;

vec3 tangent = g_NormalMatrix * modelTangent;

vec3 binormal = cross( normal, tangent );

/* Transform localViewDirection into texture space */

viewDirection.x = dot( tangent, localViewDirection );

viewDirection.y = dot( binormal, localViewDirection );

viewDirection.z = dot( normal, localViewDirection );

for(int i = 0; i < 1; i++) {

vec3 localLightDirection = gl_LightSource*.position.xyz + localViewDirection;*

lightDirections*.x = dot( tangent, localLightDirection );*

lightDirections*.y = dot( binormal, localLightDirection );*

lightDirections*.z = dot( normal, localLightDirection );*

lightDirections* = normalize( lightDirections** );*

} // for

vec3 vtx =(g_WorldViewMatrix * inPosition).xyz;

vLight = (gl_LightSource[0].position).xyz - vtx;

//texture

texCoord0 = inTexCoord.xy;

vView = inPosition - g_WorldViewMatrix[3];

vNormal = g_NormalMatrix * inNormal;

vMat = inColor * gl_LightSource[0].diffuse;

gl_Position = ftransform();

}[/java]

frag

[java]varying vec3 vLight;

varying vec4 vDiff;

varying vec3 vNormal;

varying vec4 vMat;

varying vec2 texCoord0;

varying vec3 viewDirection;

varying vec3 lightDirections[1];

uniform sampler2D m_colorMap;

uniform sampler2D m_specularMap;

uniform sampler2D m_normalMap;

uniform vec4 m_vWidths;

uniform vec4 m_noiseMod;

uniform vec4 m_vWidthFactor;

uniform float m_Time;

uniform float m_Strength;

uniform float m_blend;

uniform vec4 m_Material;

void main(){

vec3 vNorm = normalize(vNormal);

vec4 vColour = vMat;

vec3 vLightN = normalize(vLight);

float x = (texCoord0.x+4.0) * (texCoord0.y+4.0) * (m_Time*10.0);

vec4 grain = vec4(mod((mod(x, 13.0) + 1.0) * (mod(x, 123.0) + 1.0), 0.01)-0.005) * m_Strength;

float ndotl = dot(vNorm, vLightN);

vec4 base0 = texture2D(colorMap, texCoord0);

//gl_FragColor = base0 * gl_FrontMaterial.diffuse;

vColour *=mix(vWidthFactor.x+(grain*noiseMod.x), vec4(1.0), step(vWidths.x,ndotl ));

vColour *=mix(vWidthFactor.y+(grain*noiseMod.y), vec4(1.0), step(vWidths.y,ndotl ));

vColour *=mix(vWidthFactor.z+(grain*noiseMod.z), vec4(1.0), step(vWidths.z,ndotl ));

vColour *=mix(vWidthFactor.w+(grain*noiseMod.w), vec4(1.0), step(vWidths.w,ndotl ));

float lum = dot(base0.rgb, vec3(0.299, 0.587, 0.114));

vec4 gray = vec4(lum, lum, lum, base0.a);

gl_FragColor = mix(base0, gray, blend);

gl_FragColor *= ((mix(base0, gray, blend) + vColour) * gl_FrontMaterial.diffuse)* Material;

/* Extract colors from baseMap and specularMap */

//vec4 baseColor = texture2D( baseMap, texcoords );

vec3 normal = normalize( ( texture2D( normalMap, texCoord0 ).xyz * 2.0 ) - 1.0 );

vec4 specularColor = texture2D( specularMap, texCoord0 );

vec3 normalizedViewDirection = normalize( viewDirection );

/* Sum up lighting models with OpenGL provided light/material properties */

vec4 totalAmbient = gl_LightModel.ambient * gl_FrontMaterial.ambient; // init with global ambient

vec4 totalDiffuse;

vec4 totalSpecular;

//

LIGHTS

for(int i = 0; i < 1; i++) {

vec3 normalizedLightDirection = normalize( lightDirections

* );*

float NDotL = dot( normal, normalizedLightDirection );

vec3 reflection = normalize( ( ( 2.0 * normal ) * NDotL ) - normalizedLightDirection );

/* Sum up lighting models with OpenGL provided light/material properties */

totalAmbient += gl_FrontLightProduct*.ambient;*

totalDiffuse += clamp( gl_FrontLightProduct*.diffuse * max( 0.0, NDotL ), 0.0, 1.0 );*

totalSpecular += gl_FrontLightProduct*.specular * specularColor * ( pow( max( 0.0, dot( reflection, normalizedViewDirection ) ), gl_FrontMaterial.shininess ) );*

} // for

/* Set final pixel color as sum of lighting models */

gl_FragColor *= (totalAmbient * base0 + totalDiffuse * base0 + totalSpecular)*2.5;

gl_FragColor += (((mix(base0, gray, blend) + vColour) * gl_FrontMaterial.diffuse * Material)*(totalAmbient * base0 + totalDiffuse * base0 + totalSpecular) )*0.75;

}

[/java]

intended result - there are some artifacts but that has to do with RMs tangent calculations..I've read

http://i.imgur.com/83URx.jpg