is it possible to develop a parallax mapping shader without using a texture? i don’t think so because parallax means texel displacemnt but my teacher don’t think so… he’s an idiot as i think or he’s right?
You can use a function that produce the bump and so dont use texture
The texture just gives you data to use in your shader.
If you can generate that data in realtime, in the shader, there is no need for a texture.
Yes but in this case it’s bump mapping not parallax
No, he just meant the displacement when writing “bump”. It does not matter if you use a texture for texel displacement, you can generate all the color, normal and displacement values per fragment in the shader. Although I must say, I wouldn’t call a technique “mapping” anymore, when no texture is involved…
Though you’d still be mapping your displacement function to the surface :).
touché
I just realized that such function is called a “procedural texture” so it is a texture, than my answer is no you cannot make paralallax without texture but you can without bitmap.
Ok thank you , that’s what i thought
Depends on your definition of ‘texture’ eh?
- OpenGL texture
- the surface of a shape
OpenGL texture. But i mean , for sure i could use a procedural texture as heightmap , but anyway if i don’t apply a OpenGL texture to the surface i can not see the effect of the parallax, because it’s a texel displacement
Why? It doesn’t need to be a textel-displacement. It can be another displaced (producerally) generated value…
I think that a texture can be see as a texel function of dimension n:
texel=f(u,v,w,etc…)
and in the particular case of 2d bitmap it is:
f(u,v)=pixels[u,v];