Pswin
1
hi
this is shader of the Hexagonal mosaic filter ( in the ShaderX2 book)
what is wrong in this shader?
uniform sampler2D color_map_1,displacment_map;
void main(void)
{
vec4 displacment = texture2D( displacment_map,gl_TexCoord[0] * 20);
gl_FragColor = texture2D(color_map_1, gl_TexCoord[0] + displacment);
}
oc2k1
2
Maybee you should correct some details:
void main(void){
vec4 displacment = texture2D( displacment_map,gl_TexCoord[0].xy * 20.0);
gl_FragColor = texture2D(color_map_1, gl_TexCoord[0].xy + displacment.xy);
}
reading the compilers output may help too…
Pswin
3
no
that is not correct.
my shader is completely wrong. i must re write this
i want Hexagonal mosaic filter effect on the:
http://www.talula.demon.co.uk/postprocessing/postprocessing.html
system
Closed
4
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.