buildaworldnet / IrrlichtBAW

Build A World fork of Irrlicht
http://www.buildaworld.net
Apache License 2.0
122 stars 28 forks source link

Image Filters Bugs #460

Closed AnastaZIuk closed 2 years ago

AnastaZIuk commented 4 years ago

List is for gathering found bugs and documenting them.

Map:

If you found a bug or you suspect something to be a bug, put your description here in following way:

In case of probability of being a bug, you won't pass error compile code, but you have to describe in a detail what's wrong and what's going on.

Unsolved:

Probability of bugs:

  1. Copying regions with multilayered and mipmaped images. ImageView data is filled with black value and that's what renderDoc sees. ImageView is returned from GLI Loader which passes region validation, but probably there is something wrong while performing cpu2gpu conversion somewhere in copybuffertoimage.

Fixed:

  1. CState * to const Swizzle & conversion
  2. https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L120 and https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L191
devshgraphicsprogramming commented 4 years ago

Copying regions with multilayered and mipmaped images. ImageView data is filled with black value and that's what renderDoc sees. ImageView is returned from GLI Loader which passes region validation, but probably there is something wrong while performing cpu2gpu conversion somewhere in copybuffertoimage.

I need a concrete reproducible example

devshgraphicsprogramming commented 4 years ago

CState bug fixed

AnastaZIuk commented 4 years ago

Another one CState * to const Swizzle & conversion bug

Severity    Code    Description Project Path    File    Line    Suppression State
Error   C2664   'void irr::asset::convertColor<irr::asset::EF_R8_SRGB,irr::asset::EF_R8G8B8_SRGB,Swizzle>(const void *[],void *,uint32_t,uint32_t,const Swizzle &)': cannot convert argument 5 from 'irr::asset::impl::CSwizzleAndConvertImageFilterBase<Swizzle>::CState *' to 'const Swizzle &'   Irrlicht    C:\work\IrrlichtBaw\IrrlichtBAW parallel work\include\irr\asset\filters C:\work\IrrlichtBaw\IrrlichtBAW parallel work\include\irr\asset\filters\CSwizzleAndConvertImageFilter.h 157 

link: https://github.com/buildaworldnet/IrrlichtBAW/blob/image_manipulator/include/irr/asset/filters/CSwizzleAndConvertImageFilter.h#L157

AnastaZIuk commented 4 years ago

CState* parameter incompatibility

Severity    Code    Description Project Path    File    Line    Suppression State
Error (active)  E0167   argument of type "irr::asset::impl::CSwizzleAndConvertImageFilterBase<irr::asset::PolymorphicSwizzle>::CState *" is incompatible with parameter of type "irr::asset::impl::CSwizzleAndConvertImageFilterBase<irr::asset::PolymorphicSwizzle>::CState *" Irrlicht    C:\work\IrrlichtBaw\IrrlichtBAW parallel work\include\irr\asset\filters C:\work\IrrlichtBaw\IrrlichtBAW parallel work\include\irr\asset\filters\CSwizzleAndConvertImageFilter.h 69  

link: https://github.com/buildaworldnet/IrrlichtBAW/blob/image_manipulator/include/irr/asset/filters/CSwizzleAndConvertImageFilter.h#L69

devshgraphicsprogramming commented 4 years ago

how can I provoke them?

AnastaZIuk commented 4 years ago

@devshgraphicsprogramming calls:

copy filter: https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L83

convert filter:

https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L120

https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L191

https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-eb2dc54b0c55978bb914855feb4a7255R32

https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-93991be5497ff93db177bfe829ca6f07R63

https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-c60d97d960d7645e1936db58c4a2469eR102

devshgraphicsprogramming commented 4 years ago

@AnastaZIuk this works without issue

https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L83

devshgraphicsprogramming commented 4 years ago

@AnastaZIuk https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L120 and https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L191

fixed in latest commit

and those links dont work https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-eb2dc54b0c55978bb914855feb4a7255R32

https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-93991be5497ff93db177bfe829ca6f07R63

https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-c60d97d960d7645e1936db58c4a2469eR102

AnastaZIuk commented 4 years ago

@AnastaZIuk https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L120 and https://github.com/Crisspl/IrrlichtBAW/blob/5274cf63c26491483f61215f351f255e49f3df2e/include/irr/asset/IImageAssetHandlerBase.h#L191

fixed in latest commit

and those links dont work https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-eb2dc54b0c55978bb914855feb4a7255R32

https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-93991be5497ff93db177bfe829ca6f07R63

https://github.com/Crisspl/IrrlichtBAW/pull/32/files#diff-c60d97d960d7645e1936db58c4a2469eR102

it compiles now

devshgraphicsprogramming commented 4 years ago

so how do I reproduce GLI bug?

AnastaZIuk commented 4 years ago

so how do I reproduce GLI bug?

Uh my dear, now I've been testing all applied filters in writers and loaders. When everything will be clean, then you will have again a clear and ready to use example 09 to figure out what's wrong with GLI bug

AnastaZIuk commented 4 years ago

@devshgraphicsprogramming you can track my branch, GLI left https://github.com/Crisspl/IrrlichtBAW/pull/32

AnastaZIuk commented 4 years ago

component mapping doesn't work in swizzle and convert filter

AnastaZIuk commented 4 years ago

image above there is an array_r8_uint.dds image that is being displayed and saved as screen shot correctly, but in priciple the writer doesn't write texel data, everything is black somehow. I deleted the file and now we use R8_1_unorm, but the behaviour is the same

image

bug can be fixed after pushing new changes to color space by me

devshgraphicsprogramming commented 4 years ago

what's the status of the GLI bug @AnastaZIuk ?

devshgraphicsprogramming commented 3 years ago

@AnastaZIuk canwe close?

AnastaZIuk commented 3 years ago

I will try to tell you tomorrow

AnastaZIuk commented 3 years ago

gotta check it

devshgraphicsprogramming commented 3 years ago

and?

AnastaZIuk commented 3 years ago

Fixed image swizzling https://github.com/buildaworldnet/IrrlichtBAW/pull/529/commits/22015e6ee3558d8cc0162a757603cc09e8d9125f

AnastaZIuk commented 3 years ago

and?

and it has worked since some corrections image

AnastaZIuk commented 3 years ago

There is a weird pixels behaviour on bottom and right while using CBlitFilter image Checked on latest Criss' mitsuba commit where no changes by new filters API are applied to blit filter https://github.com/buildaworldnet/IrrlichtBAW/pull/424/commits/bd1502681c93e47ec66dba8787416d55021a675e

devshgraphicsprogramming commented 3 years ago

@AnastaZIuk this still a thing? Can you check on Nabla's master branch and prepare a repro?

devshgraphicsprogramming commented 2 years ago

There is a weird pixels behaviour on bottom and right while using CBlitFilter image Checked on latest Criss' mitsuba commit where no changes by new filters API are applied to blit filter bd15026

this might be what @achalpandeyy found during his polyphase work