jnsmalm / pixi3d

The 3D renderer for PixiJS. Seamless integration with 2D applications.
https://pixi3d.org
MIT License
759 stars 44 forks source link

Framebuffer is incomplete: Attachments are not all the same size. #97

Open Friksel opened 2 years ago

Friksel commented 2 years ago

Using PostProcessingSprite() sometimes the sprite just doesn't get rendered. It's than throwing these kinde of errors: image

I'm not using any textures on the 3d model, so it seems like it's talking about the PostProcessingSprite itself as being a texture.

I believe I've seen other people with the same error message on the pixi github, but I can't find it nowhere anymore and even then to me and I believe also to them it was completely unclear what was causing this and how this could even be worked around. I'm trying to debug this at the moment.

Any clue on what could cause this issue to happen? Could it be related to using the PostProcessingSprite's resolution, width or height settings? Does this even have anything to do with textures? Or could it even be something else completely?

Friksel commented 2 years ago

Could it perhaps be related to this issue from years ago?:

https://github.com/pixijs/pixijs/issues/746

jnsmalm commented 2 years ago

Do you have an example which sometimes reproduces this error?

Friksel commented 2 years ago

@jnsmalm Sorry, can't send you the project. When debugging I would try to create a new, small, project to isolate an issue. But the thing is that yesterday when I tried to debug this the issue didn't happen once and couldn't replicate it. While at other times it happens every two or third time the model is shown. It seems completely random.

I did change a little thing now tho, I was first changing the resolution of the sprite to a value that had a lot of decimals, because Javascript didn't seem to be able to do a simple calculation like 41*0.01. It didn't result in 0.41, but in 0.41000000000000003 instead. Which to me is weird (try it yourself in a Chrome dev console: console.log(41*0.01). Now I'm using toFixed(2) to round instead. As you understand, it would be weird if this would be the reason of the issue, but who knows. So I'm sure this issue is still there, only I don't know when it happens.

Long story short, it's a little difficult to create a small demo if not sure what exactly to isolate and when exactly this issue appears so we can replicate it.

jnsmalm commented 2 years ago

Sorry, not much I can do without steps to reproduce as I have never encountered this myself. Please let me know if/when you have more information. Btw, the floating point issue is not a JavaScript thing - it's a computer thing :-)

Friksel commented 2 years ago

@jnsmalm Thanks for your reaction. I understand and I don't expect you to. I was just hoping by chance you encountered the same message once and could point me into a direction. I get the feeling it has something to do with either setting the resolution or the size as that's what this project is constantly doing. On the other hand, it's never dissapearing when zooming in or out. Only when switching the sprite on or off.

Anyway, too much information for you as you don't know the project ;) Pretty busy with other things now, but when I know what's causing this I'll let you know. If by any chance you encounter the same messages somewhere, I'm all ears.

Btw, the floating point issue is not a JavaScript thing - it's a computer thing :-)

My floating point, binary and machine language/opcodes education is a long time ago but I figured it would :)