uniform sampler2D DisplacementMap;
uniform float DisplacementMapSize;
void main()
{
vec4 Pos;
Pos = gl_Vertex;
vec2 DisTexCoord;
DisTexCoord.x = Pos.x/DisplacementMapSize;
DisTexCoord.y = Pos.z/DisplacementMapSize;
vec4 color = texture2DLod(DisplacementMap,DisTexCoord,0.0);
gl_Position = gl_ModelViewProjectionMatrix * Pos;
}
[Edited by - barp12 on September 30, 2007 6:10:26 AM]
glTexGen Problem(read the bottom)
i tried to write a shader and i get link error what the problem
here is the shader:
i dont recive any errors just Link faild error and i found the problem my Graphic card doesn't support textures in Vertex Shader
now i have new problem i trying to use glTexGen to genarate texcoord for Terrain and i getting weird result does anyone can show me example to use glTexGen For Terrain.
now i have new problem i trying to use glTexGen to genarate texcoord for Terrain and i getting weird result does anyone can show me example to use glTexGen For Terrain.
You really need to be more specific if you want other people to be able to help you. Put your mind together and be *specific*. Post some code snippets, error messages, etc. What link error(s) do you get? The compiler must be showing something. You can get a link error for every single function mankind (and aliens for that matter [wink]) has ever written, so saying that you get a link error without specifying the error message is like trying to hunt an elephant* with a needle. It really won't get the job done. Would it?
*Not to mention it's illegal to hunt an elephant!
*Not to mention it's illegal to hunt an elephant!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement