www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: lajidahe22 on October 18, 2011, 01:29:51 am

Title: Need Help with GLSL
Post by: lajidahe22 on October 18, 2011, 01:29:51 am
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
Title: Re: Need Help with GLSL
Post by: EgonOlsen on October 18, 2011, 11:48:10 am
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.