Hardware bugs in phat psp?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Hardware bugs in phat psp?

Post by MDave »

I tried a search to see if there was anything on hardware bugs sony left behind for phat psp's, but no such luck.

Reason I ask, is because I'm rendering a skybox which works perfectly fine on my slim psp, but on the phat psp it looks like the uv coordinates are screwing up in strange ways when I start clipping the skybox polys against my world geometry (when it isn't getting clipped, it looks fine). Same eboot, same rendering code, doing nothing specific for the slim or phat psp's.

Slim:
Image

Phat:
Image

Rendering Code (sorry its a lot, would be great if I could get it cut down):

Code: Select all

vec3_t	skyclip[6] = {
	{1,1,0},
	{1,-1,0},
	{0,-1,1},
	{0,1,1},
	{1,0,1},
	{-1,0,1}
};
int	c_sky;

// 1 = s, 2 = t, 3 = 2048
int	st_to_vec[6][3] =
{
	{3,-1,2},
	{-3,1,2},

	{1,3,2},
	{-1,-3,2},

	{-2,-1,3},		// 0 degrees yaw, look straight up
	{2,-1,-3}		// look straight down

//	{-1,2,3},
//	{1,2,-3}
};

// s = [0]/[2], t = [1]/[2]
int	vec_to_st[6][3] =
{
	{-2,3,1},
	{2,3,-1},

	{1,3,2},
	{-1,3,-2},

	{-2,-1,3},
	{-2,1,-3}

//	{-1,2,3},
//	{1,2,-3}
};

float	skymins[2][6], skymaxs[2][6];

void DrawSkyPolygon (int nump, vec3_t vecs)
{
	int		i,j;
	vec3_t	v, av;
	float	s, t, dv;
	int		axis;
	float	*vp;

	c_sky++;

	// decide which face it maps to
	VectorCopy (vec3_origin, v);
	for &#40;i=0, vp=vecs ; i<nump ; i++, vp+=3&#41;
	&#123;
		VectorAdd &#40;vp, v, v&#41;;
	&#125;
	av&#91;0&#93; = fabs&#40;v&#91;0&#93;&#41;;
	av&#91;1&#93; = fabs&#40;v&#91;1&#93;&#41;;
	av&#91;2&#93; = fabs&#40;v&#91;2&#93;&#41;;
	if &#40;av&#91;0&#93; > av&#91;1&#93; && av&#91;0&#93; > av&#91;2&#93;&#41;
	&#123;
		if &#40;v&#91;0&#93; < 0&#41;
			axis = 1;
		else
			axis = 0;
	&#125;
	else if &#40;av&#91;1&#93; > av&#91;2&#93; && av&#91;1&#93; > av&#91;0&#93;&#41;
	&#123;
		if &#40;v&#91;1&#93; < 0&#41;
			axis = 3;
		else
			axis = 2;
	&#125;
	else
	&#123;
		if &#40;v&#91;2&#93; < 0&#41;
			axis = 5;
		else
			axis = 4;
	&#125;

	// project new texture coords
	for &#40;i=0 ; i<nump ; i++, vecs+=3&#41;
	&#123;
		j = vec_to_st&#91;axis&#93;&#91;2&#93;;
		if &#40;j > 0&#41;
			dv = vecs&#91;j - 1&#93;;
		else
			dv = -vecs&#91;-j - 1&#93;;

		j = vec_to_st&#91;axis&#93;&#91;0&#93;;
		if &#40;j < 0&#41;
			s = -vecs&#91;-j -1&#93; / dv;
		else
			s = vecs&#91;j-1&#93; / dv;
		j = vec_to_st&#91;axis&#93;&#91;1&#93;;
		if &#40;j < 0&#41;
			t = -vecs&#91;-j -1&#93; / dv;
		else
			t = vecs&#91;j-1&#93; / dv;

		if &#40;s < skymins&#91;0&#93;&#91;axis&#93;&#41;
			skymins&#91;0&#93;&#91;axis&#93; = s;
		if &#40;t < skymins&#91;1&#93;&#91;axis&#93;&#41;
			skymins&#91;1&#93;&#91;axis&#93; = t;
		if &#40;s > skymaxs&#91;0&#93;&#91;axis&#93;&#41;
			skymaxs&#91;0&#93;&#91;axis&#93; = s;
		if &#40;t > skymaxs&#91;1&#93;&#91;axis&#93;&#41;
			skymaxs&#91;1&#93;&#91;axis&#93; = t;
	&#125;
&#125;

#define	MAX_CLIP_VERTS	64
void ClipSkyPolygon &#40;int nump, vec3_t vecs, int stage&#41;
&#123;
	float	*norm;
	float	*v;
	qboolean	front, back;
	float	d, e;
	float	dists&#91;MAX_CLIP_VERTS&#93;;
	int		sides&#91;MAX_CLIP_VERTS&#93;;
	vec3_t	newv&#91;2&#93;&#91;MAX_CLIP_VERTS&#93;;
	int		newc&#91;2&#93;;
	int		i, j;

	if &#40;nump > MAX_CLIP_VERTS-2&#41;
		Sys_Error &#40;"ClipSkyPolygon&#58; MAX_CLIP_VERTS"&#41;;
	if &#40;stage == 6&#41;
	&#123;	// fully clipped, so draw it
		DrawSkyPolygon &#40;nump, vecs&#41;;
		return;
	&#125;

	front = back = qfalse;
	norm = skyclip&#91;stage&#93;;
	for &#40;i=0, v = vecs ; i<nump ; i++, v+=3&#41;
	&#123;
		d = DotProduct &#40;v, norm&#41;;
		if &#40;d > ON_EPSILON&#41;
		&#123;
			front = qtrue;
			sides&#91;i&#93; = SIDE_FRONT;
		&#125;
		else if &#40;d < ON_EPSILON&#41;
		&#123;
			back = qtrue;
			sides&#91;i&#93; = SIDE_BACK;
		&#125;
		else
			sides&#91;i&#93; = SIDE_ON;
		dists&#91;i&#93; = d;
	&#125;

	if &#40;!front || !back&#41;
	&#123;	// not clipped
		ClipSkyPolygon &#40;nump, vecs, stage+1&#41;;
		return;
	&#125;

	// clip it
	sides&#91;i&#93; = sides&#91;0&#93;;
	dists&#91;i&#93; = dists&#91;0&#93;;
	VectorCopy &#40;vecs, &#40;vecs+&#40;i*3&#41;&#41; &#41;;
	newc&#91;0&#93; = newc&#91;1&#93; = 0;

	for &#40;i=0, v = vecs ; i<nump ; i++, v+=3&#41;
	&#123;
		switch &#40;sides&#91;i&#93;&#41;
		&#123;
		case SIDE_FRONT&#58;
			VectorCopy &#40;v, newv&#91;0&#93;&#91;newc&#91;0&#93;&#93;&#41;;
			newc&#91;0&#93;++;
			break;
		case SIDE_BACK&#58;
			VectorCopy &#40;v, newv&#91;1&#93;&#91;newc&#91;1&#93;&#93;&#41;;
			newc&#91;1&#93;++;
			break;
		case SIDE_ON&#58;
			VectorCopy &#40;v, newv&#91;0&#93;&#91;newc&#91;0&#93;&#93;&#41;;
			newc&#91;0&#93;++;
			VectorCopy &#40;v, newv&#91;1&#93;&#91;newc&#91;1&#93;&#93;&#41;;
			newc&#91;1&#93;++;
			break;
		&#125;

		if &#40;sides&#91;i&#93; == SIDE_ON || sides&#91;i+1&#93; == SIDE_ON || sides&#91;i+1&#93; == sides&#91;i&#93;&#41;
			continue;

		d = dists&#91;i&#93; / &#40;dists&#91;i&#93; - dists&#91;i+1&#93;&#41;;
		for &#40;j=0 ; j<3 ; j++&#41;
		&#123;
			e = v&#91;j&#93; + d*&#40;v&#91;j+3&#93; - v&#91;j&#93;&#41;;
			newv&#91;0&#93;&#91;newc&#91;0&#93;&#93;&#91;j&#93; = e;
			newv&#91;1&#93;&#91;newc&#91;1&#93;&#93;&#91;j&#93; = e;
		&#125;
		newc&#91;0&#93;++;
		newc&#91;1&#93;++;
	&#125;

	// continue
	ClipSkyPolygon &#40;newc&#91;0&#93;, newv&#91;0&#93;&#91;0&#93;, stage+1&#41;;
	ClipSkyPolygon &#40;newc&#91;1&#93;, newv&#91;1&#93;&#91;0&#93;, stage+1&#41;;
&#125;
/*
==============
R_ClearSkyBox
==============
*/
void R_ClearSkyBox &#40;void&#41;
&#123;
	int		i;

	for &#40;i=0 ; i<6 ; i++&#41;
	&#123;
		skymins&#91;0&#93;&#91;i&#93; = skymins&#91;1&#93;&#91;i&#93; = 9999;
		skymaxs&#91;0&#93;&#91;i&#93; = skymaxs&#91;1&#93;&#91;i&#93; = -9999;
	&#125;
&#125;

float s_axis;
float t_axis;
vec3_t v_axis;

void MakeSkyVec &#40;float s, float t, int axis&#41;
&#123;
	vec3_t		b;
	int			j, k;

	b&#91;0&#93; = s*r_skyclip.value;
	b&#91;1&#93; = t*r_skyclip.value;
	b&#91;2&#93; = r_skyclip.value;

	for &#40;j=0 ; j<3 ; j++&#41;
	&#123;
		k = st_to_vec&#91;axis&#93;&#91;j&#93;;
		if &#40;k < 0&#41;
			v_axis&#91;j&#93; = -b&#91;-k - 1&#93;;
		else
			v_axis&#91;j&#93; = b&#91;k - 1&#93;;
		v_axis&#91;j&#93; += r_origin&#91;j&#93;;
	&#125;

	// avoid bilerp seam
	s = &#40;s+1&#41;*0.5;
	t = &#40;t+1&#41;*0.5;

	if &#40;s < 1.0/512&#41;
		s = 1.0/512;
	else if &#40;s > 511.0/512&#41;
		s = 511.0/512;
	if &#40;t < 1.0/512&#41;
		t = 1.0/512;
	else if &#40;t > 511.0/512&#41;
		t = 511.0/512;

	t = 1.0 - t;

	s_axis = s;
	t_axis = t;
&#125;

/*
==============
R_DrawSkyBox
==============
*/
void R_DrawSkyBox &#40;void&#41;
&#123;
    int		i;
    float   r,g,b,a;

	for &#40;i=0 ; i<6 ; i++&#41;
	&#123;
		// Allocate memory for this polygon.
		const int		unclipped_vertex_count	= 4;
		glvert_t* const	unclipped_vertices		=
			static_cast<glvert_t*>&#40;sceGuGetMemory&#40;sizeof&#40;glvert_t&#41; * unclipped_vertex_count&#41;&#41;;

		if &#40;skymins&#91;0&#93;&#91;i&#93; >= skymaxs&#91;0&#93;&#91;i&#93;
		|| skymins&#91;1&#93;&#91;i&#93; >= skymaxs&#91;1&#93;&#91;i&#93;&#41;
			continue;

        GL_Bind &#40;skyimage&#91;skytexorder&#91;i&#93;&#93;&#41;;

		MakeSkyVec &#40;skymins&#91;0&#93;&#91;i&#93;, skymins&#91;1&#93;&#91;i&#93;, i&#41;;

        unclipped_vertices&#91;0&#93;.st&#91;0&#93;	    = s_axis;
        unclipped_vertices&#91;0&#93;.st&#91;1&#93;	    = t_axis;
        unclipped_vertices&#91;0&#93;.xyz&#91;0&#93;	= v_axis&#91;0&#93;;
        unclipped_vertices&#91;0&#93;.xyz&#91;1&#93;	= v_axis&#91;1&#93;;
        unclipped_vertices&#91;0&#93;.xyz&#91;2&#93;	= v_axis&#91;2&#93;;

		MakeSkyVec &#40;skymins&#91;0&#93;&#91;i&#93;, skymaxs&#91;1&#93;&#91;i&#93;, i&#41;;

        unclipped_vertices&#91;1&#93;.st&#91;0&#93;	    = s_axis;
        unclipped_vertices&#91;1&#93;.st&#91;1&#93;	    = t_axis;
        unclipped_vertices&#91;1&#93;.xyz&#91;0&#93;	= v_axis&#91;0&#93;;
        unclipped_vertices&#91;1&#93;.xyz&#91;1&#93;	= v_axis&#91;1&#93;;
        unclipped_vertices&#91;1&#93;.xyz&#91;2&#93;	= v_axis&#91;2&#93;;

		MakeSkyVec &#40;skymaxs&#91;0&#93;&#91;i&#93;, skymaxs&#91;1&#93;&#91;i&#93;, i&#41;;

        unclipped_vertices&#91;2&#93;.st&#91;0&#93;	    = s_axis;
        unclipped_vertices&#91;2&#93;.st&#91;1&#93;	    = t_axis;
        unclipped_vertices&#91;2&#93;.xyz&#91;0&#93;	= v_axis&#91;0&#93;;
        unclipped_vertices&#91;2&#93;.xyz&#91;1&#93;	= v_axis&#91;1&#93;;
        unclipped_vertices&#91;2&#93;.xyz&#91;2&#93;	= v_axis&#91;2&#93;;

		MakeSkyVec &#40;skymaxs&#91;0&#93;&#91;i&#93;, skymins&#91;1&#93;&#91;i&#93;, i&#41;;

        unclipped_vertices&#91;3&#93;.st&#91;0&#93;	    = s_axis;
        unclipped_vertices&#91;3&#93;.st&#91;1&#93;	    = t_axis;
        unclipped_vertices&#91;3&#93;.xyz&#91;0&#93;	= v_axis&#91;0&#93;;
        unclipped_vertices&#91;3&#93;.xyz&#91;1&#93;	= v_axis&#91;1&#93;;
        unclipped_vertices&#91;3&#93;.xyz&#91;2&#93;	= v_axis&#91;2&#93;;

        if &#40;clipping&#58;&#58;is_clipping_required&#40;
            unclipped_vertices,
            unclipped_vertex_count&#41;&#41;
        &#123;
            // Clip the polygon.
            const glvert_t*	clipped_vertices;
            std&#58;&#58;size_t		clipped_vertex_count;
            clipping&#58;&#58;clip&#40;
                unclipped_vertices,
                unclipped_vertex_count,
                &clipped_vertices,
                &clipped_vertex_count&#41;;

            // Did we have any vertices left?
            if &#40;clipped_vertex_count&#41;
            &#123;
                // Copy the vertices to the display list.
                const std&#58;&#58;size_t buffer_size = clipped_vertex_count * sizeof&#40;glvert_t&#41;;
                glvert_t* const display_list_vertices = static_cast<glvert_t*>&#40;sceGuGetMemory&#40;buffer_size&#41;&#41;;
                memcpy&#40;display_list_vertices, clipped_vertices, buffer_size&#41;;

                if&#40;cl.worldmodel&#41;
                    VID_SetPaletteSKY &#40;&#41;;

                Fog_DisableGFog&#40;&#41;;

                if &#40;r_refdef.fog_end > 0 && r_skyfog.value&#41;
                &#123;
                    a = r_refdef.fog_end * 0.00025f;
                    r = r_refdef.fog_red * 0.01f + &#40;a * 0.25f&#41;;
                    g = r_refdef.fog_green * 0.01f + &#40;a * 0.25f&#41;;
                    b = r_refdef.fog_blue * 0.01f + &#40;a * 0.25f&#41;;

                    if &#40;a > 1&#41;
                        a = 1;
                    if &#40;r > 1&#41;
                        r = 1;
                    if &#40;g > 1&#41;
                        g = 1;
                    if &#40;b > 1&#41;
                        b = 1;

                    sceGuEnable&#40;GU_BLEND&#41;;
                    sceGuBlendFunc&#40;GU_ADD, GU_FIX, GU_FIX, GU_COLOR&#40;r,g,b,a&#41;, GU_COLOR&#40;r,g,b,a&#41;&#41;;
                &#125;

                sceGuDepthRange&#40;32767, 65535&#41;;

                // Draw the clipped vertices.
                sceGuDrawArray&#40;
                    GU_TRIANGLE_FAN,
                    GU_TEXTURE_32BITF | GU_VERTEX_32BITF,
                    clipped_vertex_count, 0, display_list_vertices&#41;;

                sceGuDepthRange&#40;0, 65535&#41;;

                if &#40;r_refdef.fog_end > 0 && r_skyfog.value&#41;
                &#123;
                    sceGuDisable&#40;GU_BLEND&#41;;
                    sceGuBlendFunc&#40;GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0&#41;;
                &#125;

                VID_SetPaletteTX &#40;&#41;;
                Fog_EnableGFog&#40;&#41;;

            &#125;
        &#125;
        else
        &#123;

            if&#40;cl.worldmodel&#41;
                VID_SetPaletteSKY &#40;&#41;;

            Fog_DisableGFog&#40;&#41;;

            if &#40;r_refdef.fog_end > 0 && r_skyfog.value&#41;
            &#123;
                a = r_refdef.fog_end * 0.00025f;
                r = r_refdef.fog_red * 0.01f + &#40;a * 0.25f&#41;;
                g = r_refdef.fog_green * 0.01f + &#40;a * 0.25f&#41;;
                b = r_refdef.fog_blue * 0.01f + &#40;a * 0.25f&#41;;

                if &#40;a > 1&#41;
                    a = 1;
                if &#40;r > 1&#41;
                    r = 1;
                if &#40;g > 1&#41;
                    g = 1;
                if &#40;b > 1&#41;
                    b = 1;

                sceGuEnable&#40;GU_BLEND&#41;;
                sceGuBlendFunc&#40;GU_ADD, GU_FIX, GU_FIX, GU_COLOR&#40;r,g,b,a&#41;, GU_COLOR&#40;r,g,b,a&#41;&#41;;
            &#125;

            sceGuDepthRange&#40;32767, 65535&#41;;

            // Draw the poly directly.
            sceGuDrawArray&#40;
                GU_TRIANGLE_FAN,
                GU_TEXTURE_32BITF | GU_VERTEX_32BITF,
                unclipped_vertex_count, 0, unclipped_vertices&#41;;

            sceGuDepthRange&#40;0, 65535&#41;;

            if &#40;r_refdef.fog_end > 0 && r_skyfog.value&#41;
            &#123;
                sceGuDisable&#40;GU_BLEND&#41;;
                sceGuBlendFunc&#40;GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0&#41;;
            &#125;

            VID_SetPaletteTX &#40;&#41;;
            Fog_EnableGFog&#40;&#41;;
        &#125;
	&#125;
&#125;

//===============================================================

/*
=================
R_DrawSkyChain
=================
*/
void R_DrawSkyChain &#40;msurface_t *s&#41;
&#123;
	msurface_t	*fa;
    int		i;
    vec3_t	verts&#91;MAX_CLIP_VERTS&#93;;
    glpoly_t	*p;

    if &#40;skybox_name&#91;0&#93;&#41; // if the skybox has a name, draw the skybox
	&#123;
        c_sky = 0;
 //       GL_Bind&#40;solidskytexture&#41;;

        // calculate vertex values for sky box

        for &#40;fa=s ; fa ; fa=fa->texturechain&#41;
        &#123;
            for &#40;p=fa->polys ; p ; p=p->next&#41;
            &#123;
                for &#40;i=0 ; i<p->numverts ; i++&#41;
                &#123;
                    VectorSubtract &#40;p->verts&#91;i&#93;.xyz, r_origin, verts&#91;i&#93;&#41;;
                &#125;
                ClipSkyPolygon &#40;p->numverts, verts&#91;0&#93;, 0&#41;;
            &#125;

        &#125;
	&#125;
    else // otherwise, draw the normal quake sky
	&#123;
        // used when gl_texsort is on
        GL_Bind&#40;solidskytexture&#41;;

        if &#40;kurok&#41;
            speedscale = realtime*2;
        else
            speedscale = realtime*8;

        speedscale -= &#40;int&#41;speedscale & ~127 ;

        for &#40;fa=s ; fa ; fa=fa->texturechain&#41;
            EmitSkyPolys &#40;fa&#41;;

        sceGuEnable&#40;GU_BLEND&#41;;
//        sceGuTexFunc&#40;GU_TFX_REPLACE, GU_TCC_RGBA&#41;;

        GL_Bind &#40;alphaskytexture&#41;;

        if &#40;kurok&#41;
            speedscale = realtime*4;
        else
            speedscale = realtime*16;

        speedscale -= &#40;int&#41;speedscale & ~127 ;

        for &#40;fa=s ; fa ; fa=fa->texturechain&#41;
            EmitSkyPolys &#40;fa&#41;;

        sceGuDisable&#40;GU_BLEND&#41;;
//        sceGuTexFunc&#40;GU_TFX_REPLACE, GU_TCC_RGBA&#41;;
	&#125;
&#125;
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I'd look more into how you're doing the textures... the main difference between the Phat and Slim as far a video goes is the amount of vram. Maybe you're loading more than 2 MB into vram, which will work in the Slim, but not the Phat.
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

I havn't unlocked the extra 2mb of vram for the slim (because I'm having problems using it after unlocking it).

Can't be vram because I fallback on using system ram if there isn't any vram left to allocate. Thanks to some help on irc, it seems to be related to how the phat psp dosn't like uvmap coordinates below 0, which the slim dosn't suffer from. Which is what happens when the skypolys are being shifted around (and the coordinates) because of clipping against the world geometry. Not sure what to do.
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

You could try manually wrapping the texture coordinates when they are < 0 by adding 1.0 to it until they are >= 0.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Solved via IRC. Screw Sony for not creating a DMA interface aware of the CPU cache for the sake of saving a few latency cycles.
Tradeoff: Hours and days of debugging pseudo-random bugs, again and again.
Anyway, thank you SCE.


For all follow-up readers - the once again solution:
Whenever you're going to draw a vertex buffer that you dynamically create (or have touched for any means), be sure to add a sceKernelDcacheWritebackRange( vertex_buffer, vertex_buffer_size ); before the following sceGu(m)Draw* call.
Last edited by Raphael on Fri Aug 22, 2008 7:14 am, edited 1 time in total.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

are you speaking about the GPU internal cache for texture or about Allegrex cache ? so far as I know, you always need to writeback the Allegrex cache especially if a DMA operation is envolved.
KickinAezz
Posts: 328
Joined: Sun Jun 03, 2007 10:05 pm

Post by KickinAezz »

Raphael wrote:Solved via IRC. Screw Sony for not creating a DMA interface aware of the CPU cache for the sake of saving a few latency cycles.
Tradeoff: Hours and days of debugging pseudo-random bugs, again and again.

Or was it all just a hardware bug to begin with, seeing this 'fixed' on SLIM?
Anyway, thank you SCE.


For all follow-up readers - the once again solution:
Whenever you're going to draw a vertex buffer that you dynamically create (or have touched for any means), be sure to add a sceKernelDcacheWritebackRange( vertex_buffer, vertex_buffer_size ); before the following sceGu(m)Draw* call.

Will sceKernelDcacheWriteBackAll() be Sufficient if framerate is not put to consideration?
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

It seems it hasn't totally fixed my problems. The S and T coordintes are the prime suspect here, the phat dosn't like me flipping the T axis (so the skybox images are displayed correctly) while the slim has no problem about it.

I get better results if I flip the T axis in these, and don't write back to the cache (still not perfect though):

Code: Select all

// Orignal
unclipped_vertices&#91;0&#93;.st&#91;1&#93;       = t_axis;

// New
unclipped_vertices&#91;0&#93;.st&#91;1&#93;       = &#40;t_axis = 1.0f - t_axis&#41;;
instead of flipping it in the other original function like this:

Code: Select all

t = 1.0f - t;
Any ideas?

Here's screenshots, using the above fix:

Without cache writeback:
Image

With cache writeback:
Image
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

Temporary solution for now is to flip the image vertically in an image editor instead of doing it in code.

I guess this is something that won't be easily solved, thanks sony :(
Post Reply