Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wierd render issues with black background #3

Open
e2dk4r opened this issue Jul 19, 2024 · 0 comments
Open

fix wierd render issues with black background #3

e2dk4r opened this issue Jul 19, 2024 · 0 comments

Comments

@e2dk4r
Copy link
Owner

e2dk4r commented Jul 19, 2024

When there is black background, renderer doesn't correctly display generated or loaded bitmaps.

Steps to reproduce:

  1. git clone --depth 1 https://github.com/e2dk4r/handmadehero -b day-157 handmadehero-issue-3
  2. patch -p1 < issue-3.patch
diff --git a/src/handmadehero.c b/src/handmadehero.c
index 35285be..2d719fe 100644
--- a/src/handmadehero.c
+++ b/src/handmadehero.c
@@ -1520,9 +1520,9 @@ GameUpdateAndRender(struct game_memory *memory, struct game_input *input, struct
 
     // render
 
-    // BitmapWithColor(renderGroup, &state->testDiffuse, particle->position, 1.0f, color);
-    BitmapAsset(renderGroup, BitmapGetFirstId(transientState->assets, ASSET_TYPE_HEAD), particle->position, 1.0f,
-                color);
+    BitmapWithColor(renderGroup, &state->testDiffuse, particle->position, 1.0f, color);
+    //BitmapAsset(renderGroup, BitmapGetFirstId(transientState->assets, ASSET_TYPE_HEAD), particle->position, 1.0f,
+     //           color);
   }
 
   TiledDrawRenderGroup(transientState->highPriorityQueue, renderGroup, &drawBuffer);
  1. Build and run

Actual result:

image

Expected result:

Blacks blended without blue artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant