Page 1 of 1

Normal mismatch

PostPosted: Mon Aug 28, 2017 9:09 am
by Ian
This one was pointed out by Yoyo

Image

https://drive.google.com/file/d/0Bw8OrQ ... sp=sharing

You can see the error in the rainbow arrow or whatever you call it. The issue is, the material double sided, and part of the front is being culled out, so you are only seeing the unlit back side. Every poly has the same face normal.

But I found debugging that the calculated polygon normal is completely different to the actual face normal, which makes no sense. It's not inverted as you might expect, it's actually completely different. I haven't gone through every poly individually but my best guess is this is why the culling is fubar here.

Image

Wonder if switching culling to the shaders would fix this. A bit annoying though, as you can't discard vertices in the vertex shader (obviously), so it would have to be done in the fragment shader which is a bit wasteful but perhaps the only way of doing it.

Re: Normal mismatch

PostPosted: Mon Aug 28, 2017 10:35 am
by Bart
Geometry shaders aren't available until OpenGL 3.x right?

Re: Normal mismatch

PostPosted: Mon Aug 28, 2017 1:27 pm
by Ian
They aren't available, but not sure they would really help anyway as even a pass through geometry shader will significantly hurt fps. Or so I have read anyway, never actually used geometry shaders.

But should be fine doing it in pixel shaders

Re: Normal mismatch

PostPosted: Tue Aug 29, 2017 3:24 pm
by Ian
Well it seems I half solved this problem, apparently it still shows up ?

model3 hardware video showing rainbow effect
https://youtu.be/vM7ozdkiYaI?t=199


YoYo09 wrote:Ian tested the R644.
However, Depending on the difference in position on the replay camera angle you still see the same problem (just like this screenshot).

Image

Unlike the previous one, the rainbow effect is normal in the middle, or appears dark without symptoms.

I am centering on the right side of 1p and putting a goal, and it is confirmed a lot when replay.

I think it seems to be related to the problem that the shadow does not appear normally.

r644 test save (Please delete the file name number 2 and use it.)
https://drive.google.com/file/d/0Bw8OrQ ... sp=sharing

tip
Rainbow effect on goal replay always
During goal replay move joystick up-left and hold start.


Not 100% sure if the original h/w is like this, or it's a bug on our end.