Hello. The question of course is little related to the theme of the forum, but you never know someone here knows.
Engine RenderWare.
I need to disable prelit (rpGEOMETRYPRELIT) and enable modulate material color (rpGEOMETRYMODULATEMATERIALCOLOR) on objects. Disable it programmatically.
I hook CObject::Render (0x0059F180) and before call original CObject::Render disable flag rpGEOMETRYPRELIT in RpGeometry (after call i return original flags) (IT WORKS!), but there was a problem. The game crashes after some time on the address 0x00757D6E (D3D9AtomicDefaultInstanceCallback) or 0x007F5A3A (RwD3D9DynamicVertexBufferCreate).
What could be the problem? It seems to me that this is due to the lighting data in the vertex buffer. But how can this be fixed?
Thank all!