
| Homepage | Members | Register | Login | Search | Old board |
![]() |
| Author | Topics » Book an abo for this thread | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
gomtuu Status:Offline Date registered: 02.11.2008 Post:2 Send Message |
I've been working on a mesh viewer for Final Fantasy Tactics for a while now. I'm using the the normal vectors and light color/position data from the mesh files, but the lighting has always been too dark compared to what I see in epsxe. At first, I solved this by drawing everything twice with blending turned on, which helped, but it made dark things a bit too bright. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
gomtuu Status:Offline Date registered: 02.11.2008 Post:2 Send Message |
I took a look at Everything You Have Always Wanted to Know about the Playstation But Were Afraid to Ask. Decyphering it was easier than I expected, but it turned out that the lighting calculation (NCCS) is basically the same as what I was using. So here are the shaders I settled on:
The only real deviations from the PSX formula are: 1. Capping "gl_LightSource[ i ].diffuse" at 1.0 to prevent super-bright lights. (Most lights in the mesh files have less than 1.0 brightness, but some have values of 6 or 7.) 2. Multiplying the "diffuse * ct" term by 2 to increase the brightness of the diffuse lighting. (Otherwise the entire scene is too dark.) It produces fairly accurate output now, but I'm not sure why I have to do either of those steps. Any ideas? Thanks, -gomtuu [Dieser Beitrag wurde am 03.11.2008 - 03:30 von gomtuu aktualisiert] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Similarly threads: | |||
| Topics | Created by | Replies | Boardname |
| Natural Vision Shader + AA Shader v2.o = Best Shader for 2d !! | zaykho | 10 | pete_bernert |
| Is a pixel accurate ePSXe 2x Mode possible? | JohnPeterson | 1 | pete_bernert |
| Was ist ein Mesh | gast | 5 | bluesims |
| wie erstellt man ein Mesh | Nicy | 2 | bluesims |
| CS:S bot navigation-mesh tutorial (in german) | CoCoNUT | 0 | coconut |
![]() |