Search found 96 matches
- Sat Aug 06, 2022 6:55 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
The games that use the same tables for A/B and C/D, are they perspectively accurate or are they distorted? Are they more accurate to slope-based perspective (straight lines remain straight), or by angle-based perspective (straight lines get curved)? If done right they are accurately a perspective, ...
- Fri Aug 05, 2022 1:40 am
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
CX and CY are supposed to be both the camera and m7x and m7y. Just so you know, I didn't test this out. Just did a ton of math problems until I got to this solution. Where do you download the thing to try it out? Ah, ok. That makes sense. It is a really nice solution. You can copy and paste the JS ...
- Thu Aug 04, 2022 5:53 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
Here is a formula for Mode-7 using only A, C and BGY: X = A(SX + BGX - CX) + B(SY + BGY - CY) + CX Y = C(SX + BGX - CX) + D(SY + BGY - CY) + CY P = Cz/(cos(b)d - sin(b)(Sy - 112)) BGX = Cx - 128 BGY = P*(cos(b)(Sy - 112) + sin(b)d) - Sy + Cy A = P*cos(a) B = sin(a) C = -P*sin(a) D = cos(a) This see...
- Thu Aug 04, 2022 2:50 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
Is the actual range of inputs for all camera settings narrow enough to generically just be a table of reciprocals? It seems to be, with some compromises, you need to weigh precision against view distance, and table size. However now that I think more about the hardware division approach that one do...
- Thu Aug 04, 2022 1:48 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
However, actually I think this kind of interpolation would not buy a real benefit on snes hardware because everything has to be done with lookup tables anyway (because mode7 hardware is busy so no hardware multiplication or division). Even if hardware was used, performance isn't much worse with div...
- Thu Aug 04, 2022 1:28 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
here's yet another iteration that has the lookup tables simulated. the multiplication table would need to be quite big, but you can get away with the reciprocal table only having a few entries (1024 in this case). also both tables can be used for general purpose. i've also tried combining the tables...
- Wed Aug 03, 2022 2:18 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
I've restructured my code a little, in this version it should be better visible what actually needs to be computed per scanline. Also I tried to simulate the precision limitations when doing the math with 16bit fixed point precision. With some optimizations applied, now it looks very close to what a...
- Tue Aug 02, 2022 7:01 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
I don't get the GBA tutorial either, but I don't think he's was doing the same thing that I was doing, because he's talking alot about it in terms of rotating and zooming the bg to make it fit. About positioning the sprites, I'd go about it much the same way you did. Basically all the conversion fro...
- Tue Aug 02, 2022 3:52 pm
- Forum: SNESdev
- Topic: Two simultaneous mode 7 textures?
- Replies: 39
- Views: 1267
- Tue Aug 02, 2022 3:45 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
FOV can be adjusted by changing the set of 3 "256" values around, sorry for not making that a variable. It is basically the forward component of the view vector. FOV should be atan(forward / 128) * 2. I.e. if you set forward to 128 instead, you should get a FOV of exactly 90 degrees. Idk a...
- Tue Aug 02, 2022 2:59 pm
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
Here's an improved version of the above, this one takes into account that the precision is better for the b and d registers than for the x and y registers. I had a look at how the PPU actually does the math, and with this version, the result should be about the same, but point_left_x and point_left_...
- Tue Aug 02, 2022 9:19 am
- Forum: SNESdev
- Topic: Kulor's Guide to Mode 7 Perspective Planes
- Replies: 62
- Views: 3973
Re: Kulor's Guide to Mode 7 Perspective Planes
I've had a look into this because I tried to figure out the "mystery curve". I didn't find the issue yet though. I tried to do a perspective projection myself and I took another approach for comparison. I think this approach might be easier to understand for some people so I'd like to try ...
- Thu Jul 28, 2022 4:35 am
- Forum: SNESdev
- Topic: Games with 16x16 background tiles
- Replies: 44
- Views: 2009
Re: Games with 16x16 background tiles
... is there some sort of gamma mapping going on here that I'm not taking into account? Does this game have anything in common with the castle exploration/puzzle game with blocky raytraced shadows that I remember from last time? iirc, i was trying different posterization algorithms when i made that...
- Mon Jul 04, 2022 10:31 am
- Forum: SNESdev
- Topic: Games with 16x16 background tiles
- Replies: 44
- Views: 2009
Re: Games with 16x16 background tiles
What were you making? I was continuing work on Rem. I had been changing the games theme / style around a lot. It's already a while ago, but I've got some screenshots left over... untitled-nq8.png The water is supposed to be animated with HDMA here. I wanted a large interconnected world but the art ...
- Mon Jul 04, 2022 7:27 am
- Forum: SNESdev
- Topic: Games with 16x16 background tiles
- Replies: 44
- Views: 2009
Re: Games with 16x16 background tiles
even with compression level data tends to get big quite fast, but it's also depending on the level of detail you want to achieve of course.