Compare commits

..

3 commits

Author SHA1 Message Date
Shinovon
4029e8ac5d Update todo 2026-05-12 22:49:50 +05:00
Shinovon
8cdae37d6e Bump pkg version 2026-05-12 22:46:35 +05:00
Shinovon
a3847a9768 VC4 fixes
Fixed lags on specific conditions, skinning
2026-05-12 22:44:44 +05:00
9 changed files with 35 additions and 16 deletions

10
TODO.md
View file

@ -16,13 +16,13 @@ Common:
GLES 2.0 specific:
- [x] Optimize to always run 10+ fps
- [x] Fix skinning shader (cutscene heads require it)
- [x] Fix face animations in optimized builds
- [x] Disappearing background in cutscenes
- [x] Huge lag spikes on VC4
- [x] Skinning shader is still broken on VC4
- [ ] Optimize to always run 20+ fps
- [ ] Use etc1 compression
- [ ] Fix face animations in optimized builds
- [ ] Skinning shader is still broken on VC4
- [ ] Disappearing background in cutscenes
- [ ] HUD still disappearing sometimes
- [ ] Huge lag spikes on VC4
GLES 1.1 specific:
- [x] Backport to STLport v4
@ -35,6 +35,6 @@ GLES 1.1 specific:
- [ ] Fix lighting
Issues:
- [x] Fix crash in Texture::destroy on exit
- [ ] Fix crash in Texture::destroy on exit
- [x] Save menu is too slow
- [x] Crash when picking up a bat

View file

@ -1,4 +1,4 @@
#{"GTA III"},(0xe0d67647),1,0,2
#{"GTA III"},(0xe0d67647),1,0,3
[0x101F7961], 0, 0, 0, {"S60ProductID"} ; S60v3
[0x1028315F], 0, 0, 0, {"S60ProductID"} ; ^1

View file

@ -1,4 +1,4 @@
#{"GTA III"},(0xe0d67647),1,0,2
#{"GTA III"},(0xe0d67647),1,0,3
[0x101F7961], 0, 0, 0, {"S60ProductID"} ; S60v3
[0x1028315F], 0, 0, 0, {"S60ProductID"} ; ^1

View file

@ -1403,10 +1403,10 @@ RenderScene(void)
}
#endif
PUSH_RENDERGROUP("RenderScene");
// CClouds::Render();
CClouds::Render();
DoRWRenderHorizon();
CRenderer::RenderRoads();
// CCoronas::RenderReflections();
CCoronas::RenderReflections();
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
CRenderer::RenderEverythingBarRoads();
CRenderer::RenderBoats();
@ -1416,7 +1416,7 @@ RenderScene(void)
#ifndef SQUEEZE_PERFORMANCE
CRenderer::RenderVehiclesButNotBoats();
#endif
// CWeather::RenderRainStreaks();
CWeather::RenderRainStreaks();
POP_RENDERGROUP();
}

View file

@ -137,10 +137,10 @@ void
CSpecialFX::Render(void)
{
PUSH_RENDERGROUP("CSpecialFX::Render");
// CMotionBlurStreaks::Render();
CMotionBlurStreaks::Render();
CBulletTraces::Render();
// CBrightLights::Render();
// CShinyTexts::Render();
CBrightLights::Render();
CShinyTexts::Render();
CMoneyMessages::Render();
#ifdef NEW_RENDERER
if(!(gbNewRenderer && FredIsInFirstPersonCam()))

View file

@ -118,6 +118,11 @@ im2DRenderPrimitive(PrimitiveType primType, void *vertices, int32 numVertices)
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, u));
glDisableVertexAttribArray(ATTRIB_NORMAL);
glDisableVertexAttribArray(ATTRIB_WEIGHTS);
glDisableVertexAttribArray(ATTRIB_INDICES);
glDisableVertexAttribArray(ATTRIB_TEXCOORDS1);
glDrawArrays(primTypeMap[primType], 0, numVertices);
glDisableVertexAttribArray(ATTRIB_POS);
@ -151,6 +156,11 @@ im2DRenderIndexedPrimitive(PrimitiveType primType,
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, u));
glDisableVertexAttribArray(ATTRIB_NORMAL);
glDisableVertexAttribArray(ATTRIB_WEIGHTS);
glDisableVertexAttribArray(ATTRIB_INDICES);
glDisableVertexAttribArray(ATTRIB_TEXCOORDS1);
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, indices);
glDisableVertexAttribArray(ATTRIB_POS);
@ -221,6 +231,11 @@ im3DRenderPrimitive(PrimitiveType primType)
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, u));
glDisableVertexAttribArray(ATTRIB_NORMAL);
glDisableVertexAttribArray(ATTRIB_WEIGHTS);
glDisableVertexAttribArray(ATTRIB_INDICES);
glDisableVertexAttribArray(ATTRIB_TEXCOORDS1);
glDrawArrays(primTypeMap[primType], 0, num3DVertices);
glDisableVertexAttribArray(ATTRIB_POS);
@ -245,6 +260,11 @@ im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndic
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, u));
glDisableVertexAttribArray(ATTRIB_NORMAL);
glDisableVertexAttribArray(ATTRIB_WEIGHTS);
glDisableVertexAttribArray(ATTRIB_INDICES);
glDisableVertexAttribArray(ATTRIB_TEXCOORDS1);
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, indices);
glDisableVertexAttribArray(ATTRIB_POS);

View file

@ -342,7 +342,6 @@ skinClose(void *o, int32, int32)
void
initSkin(void)
{
if (moreVram) return; // TODO
u_boneMatrices = registerUniform("u_boneMatrices", UNIFORM_MAT4, MAX_BONES);
Driver::registerPlugin(PLATFORM_GL3, 0, ID_SKIN,

View file

@ -13,7 +13,7 @@ main(void)
SkinVertex += (u_boneMatrices[int(in_indices.x)] * vec4(in_pos, 1.0)).xyz * in_weights.x;
SkinVertex += (u_boneMatrices[int(in_indices.y)] * vec4(in_pos, 1.0)).xyz * in_weights.y;
SkinVertex += (u_boneMatrices[int(in_indices.z)] * vec4(in_pos, 1.0)).xyz * in_weights.z;
SkinVertex += (u_boneMatrices[int(in_indices.w)] * vec4(in_pos, 1.0)).xyz * in_weights.w;
//SkinVertex += (u_boneMatrices[int(in_indices.w)] * vec4(in_pos, 1.0)).xyz * in_weights.w;
vec4 Vertex = u_world * vec4(SkinVertex, 1.0);
gl_Position = u_proj * u_view * Vertex;

View file

@ -14,7 +14,7 @@ const char *skin_vert_src =
" SkinVertex += (u_boneMatrices[int(in_indices.x)] * vec4(in_pos, 1.0)).xyz * in_weights.x;\n"
" SkinVertex += (u_boneMatrices[int(in_indices.y)] * vec4(in_pos, 1.0)).xyz * in_weights.y;\n"
" SkinVertex += (u_boneMatrices[int(in_indices.z)] * vec4(in_pos, 1.0)).xyz * in_weights.z;\n"
" SkinVertex += (u_boneMatrices[int(in_indices.w)] * vec4(in_pos, 1.0)).xyz * in_weights.w;\n"
" //SkinVertex += (u_boneMatrices[int(in_indices.w)] * vec4(in_pos, 1.0)).xyz * in_weights.w;\n"
" vec4 Vertex = u_world * vec4(SkinVertex, 1.0);\n"
" gl_Position = u_proj * u_view * Vertex;\n"