Fix overflow of 2 sides in emulator mode#1
Fix overflow of 2 sides in emulator mode#1LarsMichelsen wants to merge 1 commit intopolyfloyd:masterfrom
Conversation
|
Hey Lars, thank you for taking the effort to fix this long standing bug :) Unfortunately, this rounding is to ensure that a cell has a single color which is something that I do like to keep. This effect is especially visible when the grid size is lowered to e.g. 8. Could you reattempt your patch to keep this into account? |
|
Changing EMU_GRID to 8 with the test shader I used before works as you can see in this screenshot. But that seems to be related to the fact that the sides simply use a single color. When using another test shader I see some problems, but also the unpatched variant is not ideal. Have a look at these images. First the 64 grid: Then the 8 grid using my PR: Pro: Everything is positioned correctly The 8 grid with original code: Pro: The dots are not truncated. 10 grid using my PR: Pro: Everything is positioned correctly. The dots are not truncated. 10 grid using original code: Pro: The dots are not truncated. I have the feeling that I hadn't quite understood the problem yet. I've thought about it a bit and at least came to the conclusion that the moment the shader pattern doesn't exactly match the grid of the LEDs you have to decide whether to display half dots (which is obviously a bad simulation), leave out the half dots or expand the area. Is that the intention at this point? |
|
Yes, when the cells are positioned correctly, there should be half dots on the edges of the cube. These half dots should be culled |






I started experimenting with your shaders some hours ago. The approach looks pretty interesting. The whole shader thing is new for me, but it looks pretty exciting.
During my first steps I tried to fill all sides of the cube with different colors in emulator mode. I noticed that the colors of two sides of the cube were visible at the edge of the adjacent sides.
After some tests I found out that the problem occurs only with active "EMU_GRID" and built the attached fix.
Enclosed is a picture showing the problem. And then another one I made after my change.
Thanks for your work! :-)