Original Post
Hi All,
Would be grateful for some help. I'm getting strange artifacts with my Normals:

The normal map looks fine. I'm assuming it is my Normal Calculations. I'm calculating normals using the normal map so I'm working in Object space not with tangents. It is a simple textured tri. glsl code:
vec4 colour = vec4( texture3D(texture3d, noiseindex).xyz,0.0);
vec4 normal = vec4( texture3D(texture3dNormal, noiseindex).xyz * 2.0 - 1.0,0.0);
vec3 light_pos = normalize(vec3(10.5,0.5,0.5));
//normal = (normal - 0.5) * 2.0;
normal = normalize(normal);
normal.y = -normal.y;
// Calculate the lighting diffuse value
float diffuse = max(0.0,dot(normal,light_pos));
vec4 finalcolor = diffuse * colour;
gl_FragColor = finalcolor;
Has anyone seen this kind of artifact before ?
P.S. Can't find any way to inbed images - running Firefox/SuSe 11.2. Has this been disabled?
Regards
[Edited by - Moet_Man on June 28, 2010 9:43:01 PM]
Would be grateful for some help. I'm getting strange artifacts with my Normals:

The normal map looks fine. I'm assuming it is my Normal Calculations. I'm calculating normals using the normal map so I'm working in Object space not with tangents. It is a simple textured tri. glsl code:
vec4 colour = vec4( texture3D(texture3d, noiseindex).xyz,0.0);
vec4 normal = vec4( texture3D(texture3dNormal, noiseindex).xyz * 2.0 - 1.0,0.0);
vec3 light_pos = normalize(vec3(10.5,0.5,0.5));
//normal = (normal - 0.5) * 2.0;
normal = normalize(normal);
normal.y = -normal.y;
// Calculate the lighting diffuse value
float diffuse = max(0.0,dot(normal,light_pos));
vec4 finalcolor = diffuse * colour;
gl_FragColor = finalcolor;
Has anyone seen this kind of artifact before ?
P.S. Can't find any way to inbed images - running Firefox/SuSe 11.2. Has this been disabled?
Regards
[Edited by - Moet_Man on June 28, 2010 9:43:01 PM]