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

<ShadX>
unregistried

...   Created on 13.01.2005 - 18:27Jump to top Quote this post Report this post Edit Delete


Good, Mr. Guest,
but you can speedup using vec3 .rgb
Example:
vec3 col = texture2DProj(OGL2Texture, gl_TexCoord[0]).rgb; //or .xyz
....
gl_FragColor = vec4((d1*t1 + d2*t2 + d3*t3 + 0.875*col), 1.0)
Bye




<ShadX>
unregistried

...   Created on 14.01.2005 - 13:46Jump to top Quote this post Report this post Edit Delete


Another speedup test:

gpuPeteOGL2.slv

//
// [1XW][1YW][1ZW]
// [2XW][2YW][2ZW]
// [3XW][3YW][3ZW]
//

uniform vec4 OGL2Param;
uniform vec4 OGL2Size;

void main()
{
float offsetx = OGL2Param.x;
float offsety = OGL2Param.y;

gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;


gl_TexCoord[0] = gl_MultiTexCoord0; // center
gl_TexCoord[1] = gl_TexCoord[0].xxxy + vec4(-offsetx, 0, offsetx, offsety); // top
gl_TexCoord[2] = gl_TexCoord[0].xxxy + vec4(-offsetx, 0, offsetx, 0); // center
gl_TexCoord[3] = gl_TexCoord[0].xxxy + vec4( offsetx, 0,-offsetx, offsety); // bottom
}

gpuPeteOGL2.slf

//
// [1XW][1YW][1ZW]=[colA][colB][colC]
// [2XW][2YW][2ZW]=[colD][colX][colE]
// [3XW][3YW][3ZW]=[colF][colG][colH]
//

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

void main()
{

vec3 colA = texture2DProj(OGL2Texture, gl_TexCoord[1].xwyy).rgb;
vec3 colB = texture2DProj(OGL2Texture, gl_TexCoord[1].ywyy).rgb;
vec3 colC = texture2DProj(OGL2Texture, gl_TexCoord[1].zwyy).rgb;
vec3 colD = texture2DProj(OGL2Texture, gl_TexCoord[2].xwyy).rgb;
vec3 colX = texture2DProj(OGL2Texture, gl_TexCoord[2].ywyy).rgb;
vec3 colE = texture2DProj(OGL2Texture, gl_TexCoord[2].zwyy).rgb;
vec3 colF = texture2DProj(OGL2Texture, gl_TexCoord[3].xwyy).rgb;
vec3 colG = texture2DProj(OGL2Texture, gl_TexCoord[3].ywyy).rgb;
vec3 colH = texture2DProj(OGL2Texture, gl_TexCoord[3].zwyy).rgb;

gl_FragColor = vec4 ((0.2 * colX + 0.1 * (colA + colB + colC + colD + colE + colF + colG + colH)), 1.0);
}

Mr. Guest, can you give a try?
Bye




<ShadX>
unregistried

...   Created on 14.01.2005 - 13:51Jump to top Quote this post Report this post Edit Delete


Opss... another cut and past error... excuse me...
Corrected gl_TexCoord[3]:
gl_TexCoord[3] = gl_TexCoord[0].xxxy + vec4(-offsetx, 0, offsetx,-offsety); // bottom




<ShadX>
unregistried

...   Created on 14.01.2005 - 16:04Jump to top Quote this post Report this post Edit Delete


Yes, Mr. Guest.
But, it run on your card?
I have a 3dlabs card that eat all, but i don't know if is the same on Ati...
Bye




<ShadX>
unregistried

...   Created on 17.01.2005 - 10:33Jump to top Quote this post Report this post Edit Delete


Yes Mr. Guest, it's that I wanth to show you.
Bye




<ShadX>
unregistried

...   Created on 17.01.2005 - 11:27Jump to top Quote this post Report this post Edit Delete


P.S.:and calculating on Vertex Unit could be faster than calculating on Shader Unit...





Similarly threads:
Topics Created by Replies Boardname
Natural Vision Shader + AA Shader v2.o = Best Shader for 2d !! zaykho 10 pete_bernert
PlayStation 2 Emulation 0 pete_bernert
Emulation GPU problem. RiDsTaR 3 pete_bernert
Want to learn about PSX emulation Coding Migue 0 pete_bernert
Television Overscan Emulation Gargan 3 pete_bernert
Neuer Thread ...





Masthead

This forum is a free service of razyboard.com powered by:
Geizkragen Price Comparison. Top product in the price comparison: Krups Nespresso Essenza (XN2001)
Do you want a free forum in less than two minutes? Then click here!



Verwandte Suchbegriffe:
texture2dproj
blank