mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-10-08 19:43:40 +00:00
Projection mapping : Initialize z as 1.0f
This commit is contained in:
parent
80ae3f247f
commit
7f3a3ccd6c
@ -469,7 +469,7 @@ void TransformDrawEngine::SoftwareTransformAndDraw(
|
||||
float v[3] = {0, 0, 0};
|
||||
float c0[4] = {1, 1, 1, 1};
|
||||
float c1[4] = {0, 0, 0, 0};
|
||||
float uv[3] = {0, 0, 0};
|
||||
float uv[3] = {0, 0, 1};
|
||||
float fogCoef = 1.0f;
|
||||
|
||||
if (throughmode) {
|
||||
@ -658,7 +658,7 @@ void TransformDrawEngine::SoftwareTransformAndDraw(
|
||||
}
|
||||
uv[0] = uv[0] * widthFactor;
|
||||
uv[1] = uv[1] * heightFactor;
|
||||
|
||||
|
||||
// Transform the coord by the view matrix.
|
||||
Vec3ByMatrix43(v, out, gstate.viewMatrix);
|
||||
fogCoef = (v[2] + fog_end) * fog_slope;
|
||||
|
@ -557,9 +557,9 @@ void GenerateVertexShader(int prim, u32 vertType, char *buffer, bool useHWTransf
|
||||
temp_tc = "vec4(0.0, 0.0, 1.0, 1.0)";
|
||||
break;
|
||||
}
|
||||
// Transform by texture matrix. XYZ as we are doing projection mapping.
|
||||
WRITE(p, " v_texcoord = (u_texmtx * %s).xyz * vec3(u_uvscaleoffset.xy, 1.0);\n", temp_tc.c_str());
|
||||
}
|
||||
// Transform by texture matrix. XYZ as we are doing projection mapping.
|
||||
break;
|
||||
|
||||
case GE_TEXMAP_ENVIRONMENT_MAP: // Shade mapping - use dots from light sources.
|
||||
|
Loading…
Reference in New Issue
Block a user