Vertex shader matrix multiplication broken?

Started by
10 comments, last by JohnnyCode 10 years ago

if it is particulary on the device, and you do transform vector correctly on cpu, only thing I can think off is to make sure that the uniform matrix is constructed as you expect. Other possible thing is, try outputing constant color in fragment shader, you are now outputing fetched color, and if the alpha component is not 1.0, you may have alphatest enabled or something. Try recoding the vertex shader as much as you can to isolate what you can.

yes, a somehow broken uniform matrix is the only thing i can think of - but i have no clue how i could debug this.. any ideas? I already tried outputting constant color in the fragment shader (i.e. the most basic shader void main() {gl_FragColor = vec4(1.0);} has the same problem). I tried all i could think of in the vertex shader (i even put manual matrix multiplication there...)

Advertisement

post the code where you set vertex shader input - attribpointers and attribute indexes. Maybe you have a dynamic factor somewhere there or are hiddenly using some default values.

This topic is closed to new replies.

Advertisement