Sega Saturn Development > General Jo Engine Help

Making a 'corrected texture' for a triangle.

<< < (2/4) > >>

20EnderDude20:
Here is a comparison:
The one on the left uses the unmodified texture, or this one:

The one on the right is 'corrected', or this one:.

XL2:

--- Quote from: corvusd on August 03, 2018, 05:36:56 pm ---
--- Quote from: XL2 on August 03, 2018, 01:36:15 pm ---Ponut is right about that solution, but use caution as even if it has invisible pixels, the Saturn still needs to "render" them, so it can make things way slower quickly. The way around that is to use end codes, which none of my tools support. The other solution is to pre-distort the texture, but again I don't know much about it.

--- End quote ---

This assault me this dubt:
Is need it config register=0 Trasparent pixel disable, to avoid draw pixels in a texture/pattern used only to make a mask?
Or can be used End code draw in texture/pattern pixel data to avoid draw this pixels?
Or need both of then "activated"
For CC VDP1 is need both activated. But if you only need a mask texture... what option is the best to gain maxium time or use less cycles?
Wherever, I undestand that is necesary generate the data(pixel data or command table data) for this features to avoid waste cycles in draw VDP1.

--- End quote ---

The End code tells the VDP1 to stop processing that line, while transparent pixel just writes nothing to the framebuffer.
So if you have lots of transparent pixels, the processing speed is the same as an image full of colored pixels.

But the End code just tells the VDP1 to stop processing the line, so it's faster to render.
You need 2 end codes to stop processing a line, so the way to do it is to put one in front of your first colored pixel on each line and one right after your last colored pixel.

With clut sprites, you need to waste 2 colors for the transparent pixel and the end code.

corvusd:

--- Quote from: XL2 on August 03, 2018, 07:00:06 pm ---
--- Quote from: corvusd on August 03, 2018, 05:36:56 pm ---
--- Quote from: XL2 on August 03, 2018, 01:36:15 pm ---Ponut is right about that solution, but use caution as even if it has invisible pixels, the Saturn still needs to "render" them, so it can make things way slower quickly. The way around that is to use end codes, which none of my tools support. The other solution is to pre-distort the texture, but again I don't know much about it.

--- End quote ---

This assault me this dubt:
Is need it config register=0 Trasparent pixel disable, to avoid draw pixels in a texture/pattern used only to make a mask?
Or can be used End code draw in texture/pattern pixel data to avoid draw this pixels?
Or need both of then "activated"
For CC VDP1 is need both activated. But if you only need a mask texture... what option is the best to gain maxium time or use less cycles?
Wherever, I undestand that is necesary generate the data(pixel data or command table data) for this features to avoid waste cycles in draw VDP1.

--- End quote ---

The End code tells the VDP1 to stop processing that line, while transparent pixel just writes nothing to the framebuffer.
So if you have lots of transparent pixels, the processing speed is the same as an image full of colored pixels.

But the End code just tells the VDP1 to stop processing the line, so it's faster to render.
You need 2 end codes to stop processing a line, so the way to do it is to put one in front of your first colored pixel on each line and one right after your last colored pixel.

With clut sprites, you need to waste 2 colors for the transparent pixel and the end code.

--- End quote ---

Then, not it is possible gain speed or not "process" the transparent pixel, some way? I understand, that it save cycles in the fill pixels in the framebuffer? It not write nothing not would have cost... but in the same way to process texels data no?

ponut64:
As far as I gather, the transparent pixels consume cycles because they are present in the instruction for as long as any pixel would be until the next instruction.
The key to the end codes is to truncate the length of the instruction, not so much to reduce the computational intensity of that instruction.
It being based on filling the frame-buffer, it is timed with Vblank, so the computational intensity of what can be done by Vblank is something that you can more or less assume will never change, as it's always the same amount of time. Thus reducing the time spent on regions of the instruction is how you save performance in this case.
[I realize this is a very obvious series of statements, perhaps I shouldn't conjecture about things I don't understand]

Also, that's some good work on the pre-distortion, enderdude.
[If it wasn't clear, you grab the top-right vertice and drag it one box-size up]

20EnderDude20:
Maybe you can use a black-and-white bitmap to tell your converter where the end codes are. I think we are making something that can possibly give a primitive version of uv mapping on the saturn. ;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Sitemap 1 2 3 4 5 6 7 8 9 10 
Go to full version