Skip to content

Commit

Permalink
hack for RF_TRANS_ADD
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Aug 4, 2024
1 parent 4f88de5 commit 8ab8926
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Drawbacks:
* no books implementations
* code is little bit mess
* only gl1 has full support render
* soft,gl3,vk render has incorrect angles and no particles
* soft,gl3,vk render has incorrect angles
* need to rewrite RF_TRANS_ADD to use quake2 logic

To check:
* [ ] code use diffent angles values to quake2
Expand Down
5 changes: 5 additions & 0 deletions src/client/refresh/gl3/gl3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,11 @@ GL3_DrawSpriteModel(entity_t *e, gl3model_t *currentmodel)
GL3_UseProgram(gl3state.si3Dsprite.shaderProgram);
}

if (e->flags & RF_TRANS_ADD)
{
glBlendFunc(GL_ONE, GL_ONE);
}

verts[0].texCoord[0] = 0;
verts[0].texCoord[1] = 1;
verts[1].texCoord[0] = 0;
Expand Down
5 changes: 5 additions & 0 deletions src/client/refresh/gl4/gl4_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,11 @@ GL4_DrawSpriteModel(entity_t *e, gl4model_t *currentmodel)
GL4_UseProgram(gl4state.si3Dsprite.shaderProgram);
}

if (e->flags & RF_TRANS_ADD)
{
glBlendFunc(GL_ONE, GL_ONE);
}

verts[0].texCoord[0] = 0;
verts[0].texCoord[1] = 1;
verts[1].texCoord[0] = 0;
Expand Down

0 comments on commit 8ab8926

Please sign in to comment.