mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
Technically backface culling should cull polys when the dot product = 0, since when it equals 0 the polys is perpendicular to the camera and thus invisible. When you complete sega rally2 (if you can get that far lol) the champagne is invisible. The reason is because all the face normals are 0. So when multiplied by the model matrix they are still 0 and get culled. Tweaking the condition to only cull polys when greater than 0 fixes this, and allows these 'bad' polys to render as they do on the model3.
This commit is contained in:
parent
98106df68b
commit
864bb36b5a
|
@ -89,7 +89,7 @@ float area(vec2 a, vec2 b)
|
|||
|
||||
void main(void)
|
||||
{
|
||||
if(gs_in[0].discardPoly>=0) {
|
||||
if(gs_in[0].discardPoly > 0) {
|
||||
return; //emulate back face culling here (all vertices in poly have same value)
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ void main()
|
|||
vec4 finalData;
|
||||
vec4 fogData;
|
||||
|
||||
if(fsDiscard>=0) {
|
||||
if(fsDiscard > 0) {
|
||||
discard; //emulate back face culling here
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue