Pete´s Messageboard... No ISO/BIOS requests!

Homepage Members Register Login Search Old board


Neuer Thread ...


AuthorTopics » Book an abo for this threadClose Thread Move Thread Fix the thread Print view Delete this thread

<mongo51983>
unregistried

...   Created on 01.12.2004 - 20:57Jump to top Quote this post Report this post Edit Delete


Topic




The_Source ...
Real addict
.........

...

Status:Offline
Date registered: 14.07.2004
Post:527
Send Message
...   Created on 02.12.2004 - 06:03Jump to top Quote this post Report this post Edit Delete


There is no need to make different plugin. This features can be included to existing ones. But it won't help I think. OpenGL2 supports Very High X/Y resolution - HQ2X or others won't improve the image quality. Besides, Very High resolution + HQ2X(3X)(4X)?
There is no card that can support this.





Signature
He wants to cure the minds,
The minds of entire humankind


guest ...
Real addict
.........

...

Status:Offline
Date registered: 30.07.2004
Post:854
Send Message
...   Created on 02.12.2004 - 20:20Jump to top Quote this post Report this post Edit Delete


Actually, there are at least three ways to implement HQ2X, 3X or 4X:

1. in the soft plugin (the usual way)
2. HQxX textures in the OGL/OGL2/DX plugins
3. via shaders ( a 3DLABS Wildcat Realizm 800 would do the job - but someone has to "invent" the shader first .)

[Dieser Beitrag wurde am 03.07.2005 - 14:43 von guest aktualisiert]




<mongo51983>
unregistried

...   Created on 04.12.2004 - 19:25Jump to top Quote this post Report this post Edit Delete


I know the N64, Genesis, Snes, Nes, GBA, and a few other emulators have HQ2X, 3X, or 4X, I just thought maybe a PSX one would be cool.




The_Source ...
Real addict
.........

...

Status:Offline
Date registered: 14.07.2004
Post:527
Send Message
...   Created on 05.12.2004 - 07:10Jump to top Quote this post Report this post Edit Delete


I saw HQ2X implementation in Dommsday with OGL and D3D.
And I tell you it looks not so nice as I expected. AFiltering looks nicer and works faster.





Signature
He wants to cure the minds,
The minds of entire humankind


PeteBernert 
Admin
...............

...

Status:Offline
Date registered: 04.10.2003
Post:819
Send Message
...   Created on 12.12.2004 - 12:26Jump to top Quote this post Report this post Edit Delete


the soft gpu is open source, so everybody (with a little skill) can add another fullscreen filter (just look at how the other filters are already done).

Creating an HxQ shader for the OGL2 plugin would be kinda hard (mmm... impossible on my current R9700). well, prolly I will enhance the custom shader possibilities in the next plugin version, but first I want to get me a GF6800 to check certain things.

Last but not least, adding another "hires" texture mode in the hw/accel plugins would be possible right now, but since the textures will be modified before the actual stretching/drawing is happening, I don't think that there would be much differences to the current 2xSaI hires texture mode.




mongo51983 





Status:Offline
Date registered: 01.12.2004
Post:9
Send Message
...   Created on 07.04.2005 - 03:35Jump to top Quote this post Report this post Edit Delete


Does anyone have the link for the shader by Mr. ShadX the HQ variant. I looked in the shaders section on the forums and couldn't find it.




guest ...
Real addict
.........

...

Status:Offline
Date registered: 30.07.2004
Post:854
Send Message
...   Created on 24.04.2005 - 09:37Jump to top Quote this post Report this post Edit Delete


I hope ShadX won't get mad...

An example of 2x Hi-Res texture GLSL:
Vartex program

// Super Simplified hq2x (SShq2x) GLslang shader - ported ShadX. Comments by Pete Bernert (copied from Scale2x)
//
// see the .slf file for algorithm/license informations
//
// How to use the shaders: copy both files into the emu's "shaders" subdirectory,
// and rename them to "gpuPeteOGL2.slv" and "gpuPeteOGL2.slf".
// Configure the plugin: set "shader effects" to mode "5 - GLslang files".
//
// Important: to get a real SShq2x effect, your configured window/fullscreen size has
// to be at least twice as the internal resolution. That means:
// if your internal resolution is "0 - low", than the window/fullscreen size has to be at
// least 640x480 with most games. If you are using an internal resolution of "1 - high",
// your window/fullscreen size has to be at least 1280x960... it will not crash or
// something, if you are using smaller window/fullscreen sizes, but the algorithm will
// not work properly on all pixels. Also, the above values may vary, depending on the
// psx game's display size. The complete formula to set your window/fullscreen size is:
//
// "psx game resolution" * "plugin internal resolution mode + 1" * 2
//
// So, for a psx game which is using 320x240, and the "1 - high" mode, you would need
// 320x240 * (1 + 1) * 2 = 640x480 * 2 = 1280x960... mmmkay?
//
// Ah, and final note: SShq2X works best on games using clear 2D gfx


uniform vec4 OGL2Param;
uniform vec4 OGL2Size;

void main()
{
vec4 offsetx;
vec4 offsety;

gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

offsetx.x = 1.0/OGL2Size.x; // setup one x/y texel offset
offsetx.y = 0.0;
offsetx.w = 0.0;
offsetx.z = 0.0;
offsety.y = 1.0/OGL2Size.y;
offsety.x = 0.0;
offsety.w = 0.0;
offsety.z = 0.0;

gl_TexCoord[0] = gl_MultiTexCoord0;
gl_TexCoord[1] = gl_TexCoord[0] + offsetx;
gl_TexCoord[2] = gl_TexCoord[0] + offsetx + offsety;
gl_TexCoord[3] = gl_TexCoord[0] + offsety;
}

Fragment program

// Super Simplified hq2x (SShq2x) GLslang shader - ported by ShadX
//
// hq2x Homepage: http://www.hiend3d.com/hq2x.html
// Original license informations:
// "Copyright (C) 2003 MaxSt ( maxst@hiend3d.com )
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."
//
// OGL2Size.x = texture x size (for example "2048" in "high internal resolution" setting)
// OGL2Size.y = texture y size (for example "1024" in "high internal resolution" setting)
// OGL2Size.z = tex rect width used for current rendering (psx display width)
// OGL2Size.w = tex rect height used for current rendering (psx display height)
//
// B = black C = any color
//
// [B][B]matrix 1
// [B][C]
//
// [B][B]matrix 2
// [C][B]
//
// [C][B]matrix 3
// [B][B]
//
// [B][C]matrix 4
// [B][B]
//
// [B][C]matrix 5
// [B][C]
//
// [B][B]matrix 6
// [C][C]
//
// [C][B]matrix 7
// [C][B]
//
// [C][C]matrix 8
// [B][B]
//
// [B][C]matrix 9
// [C][C]
//
// [C][B]matrix 10
// [C][C]
//
// [C][C]matrix 11
// [B][C]
//
// [C][C]matrix 12
// [C][B]
//
// [C][C]matrix 13
// [C][C]

uniform vec4 OGL2Param;
uniform vec4 OGL2Size;
uniform sampler2D OGL2Texture;

void main()
{
vec4 colA,colB,colC,colD,col;
vec3 black;

black.x = 0.0;
black.y = 0.0;
black.z = 0.0;


colA = texture2DProj(OGL2Texture, gl_TexCoord[0]); // (top-left)
colB = texture2DProj(OGL2Texture, gl_TexCoord[1]); // (top-right)
colC = texture2DProj(OGL2Texture, gl_TexCoord[2]); // (bottom-left)
colD = texture2DProj(OGL2Texture, gl_TexCoord[3]); // (bottom-right)

if(colA == colB && colB == colC && colC != colD && colC.xyz == black) // do the SShq2x rule 1
col=colA;
else
if(colA == colB && colB == colD && colD != colC && colD.xyz == black ) // do the SShq2x rule 2
col=colA;
else
if(colB == colC && colC == colD && colD != colA && colD.xyz == black ) // do the SShq2x rule 3
col=colB;
else
if(colA == colC && colC == colD && colD != colA && colD.xyz == black ) // do the SShq2x rule 4
col=colA;
else
if(colA == colC && colC != colB && colC != colD && colC.xyz == black ) // do the SShq2x rule 5
col=colC;
else
if(colA == colB && colB != colC && colB != colD && colB.xyz == black ) // do the SShq2x rule 6
col=colB;
else
if(colB == colD && colD != colC && colD != colA && colD.xyz == black ) // do the SShq2x rule 7
col=(colA+colC)/2.0;
else
if(colC == colD && colD != colA && colD != colC && colD.xyz == black ) // do the SShq2x rule 8
col=(colA+colB)/2.0;
else
if(colA != colB && colA != colC && colA != colD && colA.xyz == black ) // do the SShq2x rule 9
col=colA;
else
if(colB != colA && colB != colC && colB != colD && colB.xyz == black ) // do the SShq2x rule 10
col=(colA+colC+colD)/3.0;
else
if(colC != colA && colC != colB && colC != colD && colC.xyz == black ) // do the SShq2x rule 11
col=(colA+colB+colD)/3.0;
else
if(colD != colA && colD != colB && colD != colC && colB.xyz == black ) // do the SShq2x rule 12
col=(colA+colB+colC)/3.0;
else
if(colA.xyz != black && colB.xyz != black && colC.xyz != black && colD.xyz != black ) // do the SShq2x rule 13
col=(colA+colB+colC+colD)/4.0;

gl_FragColor = col;
}




ShadX ...
Real addict
.........



Status:Offline
Date registered: 20.01.2005
Post:269
Send Message
...   Created on 03.05.2005 - 18:12Jump to top Quote this post Report this post Edit Delete


This shader is totally useless... is one of my first experiments and do nothing... I suggest you to wait when Pete make "Smart Texture Filtering" shader working on OGL2plugin. The algorithm is the same but is not limited to 2x.
Bye





Similarly threads:
Topics Created by Replies Boardname
shaders in non-PSX-emulators Z 2 pete_bernert
HQ2x / 4x / 5x Z 2 pete_bernert
Anyone Have A Shader Similar To HQ2X, 3X, or 4X? mongo51983 7 pete_bernert
C2D-HQ2x(1.11)__and__CComic(1.02)__(by Chris) maruke 7 pete_bernert
hq2x GLSL shader ShadX 1 pete_bernert
Neuer Thread ...





Masthead

This forum is a free service of razyboard.com
Do you want a free forum in less than two minutes? Then click here!



blank