Skip to content

Commit

Permalink
Merge branch 'rend2-unified-wip' into rend2-builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SomaZ committed Mar 7, 2024
2 parents 7be3463 + 857fda5 commit 4e70447
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shared/rd-rend2/tr_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4024,7 +4024,7 @@ static void R_GenerateSurfaceSprites( const world_t *world, int worldIndex )
for (int i = 0; i < tr.numShaders; i++)
{
const shader_t *shader = tr.shaders[i];
if (shader->spriteUbo != NULL)
if (shader->spriteUbo != -1)
continue;

numSpriteStages += shader->numSurfaceSpriteStages;
Expand Down
5 changes: 5 additions & 0 deletions shared/rd-rend2/tr_image_stb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ void R_LoadHDRImage( const char *filename, byte **data, int *width, int *height
int len = ri.FS_ReadFile (filename, (void **)&buf);
if ( len <= 0 || buf == NULL )
{
// reset output varialbes
*data = NULL;
*width = 0;
*height = 0;

return;
}
stbi_set_flip_vertically_on_load(0);
Expand Down
1 change: 1 addition & 0 deletions shared/rd-rend2/tr_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3802,6 +3802,7 @@ static shader_t *GeneratePermanentShader( void ) {
}

RB_AddShaderToShaderInstanceUBO(newShader);
newShader->spriteUbo = -1;

SortNewShader();

Expand Down

0 comments on commit 4e70447

Please sign in to comment.