Need Help with GLSL

Started by lajidahe22, October 18, 2011, 01:29:51 AM

Previous topic - Next topic

lajidahe22

Hi, I am having trouble with the newest version of JPCT-ae. I want to modify the modelviewproject matrix, so I used "shader.setUniform("modelViewProjectionMatrix", iMatrix);", but it did not work. I even set the matrix to all 0s, it still does not affect the actual gl renderer. Could you tell me what is going on?
Thank you very much

EgonOlsen

#1
That's not how it's supposed to work. If you want to modify this matrix, just to it by applying transformations to the object itself. The matrix will be injected based on the object's transformations. You are not supposed to override it with some other value. If need another/different matrix, just choose another name for your uniform and use that in your shader.