OpenGL shader UV coords issues

   1503   0   1
User Avatar
Member
14 posts
Joined: July 2014
Offline
Hi everyone!
Trying to write OGL shader.
Just feel confused with three types of shaders(geometry, vertex, fragment).
I need something for a start point.
See through example shaders in Houdini's folder, but it's working really strange for me.

I've got an object(plane) with two UV vertex attributes(uv, uv2). In vertex shader use vec3 uv and uv2 as input attributes. Then out them to fragment shader.
use sampler2d to load textures from parameters. Make my uv's vec2 and use to apply texture - and see just a constant color. When i'm changing the texture file - color is changing also. Can't figure it out.

Where can i find simple example of what i said? What i've done wrong?
Dont use geometry part of shader in this case.
  • Quick Links