ray-cast / ray-mmd

🎨 The project is designed to create a physically-based rendering at mikumikudance.
https://twitter.com/Rui_cg
Other
1.71k stars 573 forks source link

Pixelated Glow #52

Closed acastaneiras closed 6 years ago

acastaneiras commented 6 years ago

Hello, I don't really know if this is a ray-cast issue but sometimes when I put Emissive Material its Reflection looks pixelaed like this.

kddtbrp

ray-cast commented 6 years ago

Sorry, i can't fix it yet, i think it's caused by increase resolution or something else, so that samples are not enough to make it looks more smooth

acastaneiras commented 6 years ago

It could be because my resolution is 2560x1440 and it stretches it. Anyways, thank you for answering!

ray-cast commented 6 years ago

this was actually the problem i always wanted to solve, but this is not an easy problem, that it'll take me a long time to rewrite the all of the code, so i never got around to actually do, but it will be solved in the future

Amani747 commented 6 years ago

I have remedied this problem by changing:

in: PostProcessBloom.fxsub

from: static const float2 BloomScale = 512 * float2(ViewportAspect, 1);

to: static const float2 BloomScale = 1024 * float2(ViewportAspect, 1);

acastaneiras commented 6 years ago

@Amani747 Thank you very much for sharing the solution in here

Amani747 commented 6 years ago

No problem! Now keep in mind - I did not completely learn the code so I am not sure if this is a hacky band aid or a correct fix.

At this point - I know it solved the problem for me and several others with no other noticeable side effects, did it completely fix the issue for you as well?

acastaneiras commented 6 years ago

@Amani747 I don't know either, I would have to test it several times in order to see If that hotfix really has made it work but for the moment It seems it had because I haven't noticed any more pixelated glow thingys since I doubled the BloomScale constant like you said previously. \:D/

acastaneiras commented 6 years ago

Okay so, I've found the exact same project where this issue seemed to appear, and as you can see in those pictures, it looks like the fix @Amani747 told (https://github.com/ray-cast/ray-mmd/issues/52#issuecomment-397786062) really does the trick:

fixed pic2

With that being said, I will have to Close the issue.