-
Notifications
You must be signed in to change notification settings - Fork 10
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
Glob2 renders a white square instead of semi-transparent building when placing a school #124
Comments
Hum, it feels to me like the per-object-draw transparency is not correct when using the new drawing path. I do not have the full new drawing code in mind, but I feel that somehow the transparency of each draw should be stored somewhere and used in the shader when drawing each object, even from the same sprite sheet. |
Looks like I need to somehow pass the transparency values to |
In Candli I'm doing something similar using a simple pair af vertex/fragment shaders. But it is in WebGL so the setup API calls differ a bit. I can copy/paste the shaders here if that is helpfu (later, I'm on mobile now)l, although they might need some adaptation for OpenGL 2. |
Here are the Candli object shaders for WebGL 1.0 (based on OpenGL ES 2.0 API): Vertex
In Glob2 you might not need both Fragment
Hopefully these can serve as a helpful inspiration, |
When I start tutorial 4 and start to place a school in a spot where there is already a building, the game shows a white square with a red outline instead of a semi-transparent building indicator like when placing a hospital. Happens with commit c196fa5. This is probably my fault. I think the bug is from my PR #120.
Please disregard the tutorial messages in the screenshots, the "A unique string" is from when I was testing something.
The text was updated successfully, but these errors were encountered: