OpenGL Combiner
2 posters
OpenGL Combiner
Someone know where I can find ALL the default value of the combiner for the GL_TEXTURE0 and 1???
I just want to create a function like sio2ImageResetCombiners (and yes its for dot3 bumpmapping )
I just want to create a function like sio2ImageResetCombiners (and yes its for dot3 bumpmapping )
Re: OpenGL Combiner
Neat. How far along are you? If you are not too far along I could share some pointers on things I ran into. Unfortunately, I had to stop working on this feature.
Also I don't know the right answer for the default combiner states. I was just trying to get it to work, I had a ways to go to get the code all cleaned up.
Also I don't know the right answer for the default combiner states. I was just trying to get it to work, I had a ways to go to get the code all cleaned up.
zzajin- Posts : 81
Join date : 2008-10-14
Re: OpenGL Combiner
Well everything is setup, only the per frame TBN calculation when the light is moving its a pita as well as analyzing which light is the nearest one of the object... Because of that I doubt that I will integrate that for good in SIO2... Cuz in order to be 100% correct you need to calculate the nearest light on a face level which is just crazy for iPhone... I'll just present a demo that show how to do it but after that I think its up to the developers to implement what they want...
Re: OpenGL Combiner
Yeah I doubt checking the distance to each light per frame per face is a good use of cpu for iPhone games. I was assigning a light coordinate per object that would be used for all vertices in TBN calculation. It would probably look bad for large objects with multiple lights, but the light distance thing just seemed like too much. Also by setting a light at the object level I figured it would be easier to optimize outside the render pipeline and also turning normal mapping on/off for level of detail.
I think the per frame TBN matrix calculation is only need for rotated vertices. This means the TBN can be calculated once and stored in non rotating objects. I was shooting for storing this in the VBO, since I was interested in seeing if OpenGL ES Matrix Palette stuff would rotate the TBN for me on the GPU. I think I saw some of this in Imagination Tech's POD format and examples, so it might work.
The problem I ran into with TBN calculation was with the UV coordinates. For some reason I think I was unmapping them wrong. That was the next thing I needed to look into and get working.
It would be nice if at least normal mapping was integrated for good in the blender script, since blender supports it so cleanly. I added "nor_tex ( [texture number] )" to the material file to indicate which texture was the normal map.
I think the per frame TBN matrix calculation is only need for rotated vertices. This means the TBN can be calculated once and stored in non rotating objects. I was shooting for storing this in the VBO, since I was interested in seeing if OpenGL ES Matrix Palette stuff would rotate the TBN for me on the GPU. I think I saw some of this in Imagination Tech's POD format and examples, so it might work.
The problem I ran into with TBN calculation was with the UV coordinates. For some reason I think I was unmapping them wrong. That was the next thing I needed to look into and get working.
It would be nice if at least normal mapping was integrated for good in the blender script, since blender supports it so cleanly. I added "nor_tex ( [texture number] )" to the material file to indicate which texture was the normal map.
zzajin- Posts : 81
Join date : 2008-10-14
Similar topics
» SIO2 and iPhone OS 3.0
» 2D Games with SIO2 or OpenGL?
» OpenGL ES Trace
» Sio2 and OpenGL ES 2.0
» OpenGL glIsEnabled Calls
» 2D Games with SIO2 or OpenGL?
» OpenGL ES Trace
» Sio2 and OpenGL ES 2.0
» OpenGL glIsEnabled Calls
Permissions in this forum:
You cannot reply to topics in this forum