Original Post
Hello, i have been trying to figure out a way to generate "greebles" on geometry using shaders. can anyone point me in the right direction ? i was trying with Vertex-Texture-Fetch, but it seems to depend alot on high-poly geometry meshes and the displacement doesnt really look correct as it is in the texture. just tried something simple like: /// ----------------------- vec3 pos = gl_Vertex.xyz; texcoord0 = gl_MultiTexCoord0.xy; normal = normalize(gl_NormalMatrix * gl_Normal); // texture-fetch dv = texture2DLod( dispMap, gl_MultiTexCoord0.xy, 0 ); df = 0.30*dv.x + 0.59*dv.y + 0.11*dv.z; // get brightness // get new position for this vertex based on the texture coord newVertexPos = vec4( pos, 1.0 ); newVertexPos.xyz += normal * df * maxHeight; // compute clip space vec4 outPos = gl_ModelViewProjectionMatrix * newVertexPos; gl_Position = outPos; thanks in advance,