mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
hook up merc2 to fog intensity, flip some min/max fogs (#1403)
* hook up merc2 to fog intensity, flip some min/max fogs * zero initialize let stats
This commit is contained in:
parent
e3051f90ae
commit
ec9c7a55ce
|
@ -51,17 +51,17 @@ struct ObjectFileData {
|
|||
* Stats structure for let rewriting.
|
||||
*/
|
||||
struct LetRewriteStats {
|
||||
int dotimes;
|
||||
int countdown;
|
||||
int abs;
|
||||
int abs2;
|
||||
int unused;
|
||||
int ja;
|
||||
int case_no_else;
|
||||
int case_with_else;
|
||||
int set_vector;
|
||||
int set_vector2;
|
||||
int send_event;
|
||||
int dotimes = 0;
|
||||
int countdown = 0;
|
||||
int abs = 0;
|
||||
int abs2 = 0;
|
||||
int unused = 0;
|
||||
int ja = 0;
|
||||
int case_no_else = 0;
|
||||
int case_with_else = 0;
|
||||
int set_vector = 0;
|
||||
int set_vector2 = 0;
|
||||
int send_event = 0;
|
||||
|
||||
int total() const {
|
||||
return dotimes + countdown + abs + abs2 + unused + ja + case_no_else + case_with_else +
|
||||
|
|
|
@ -46,7 +46,7 @@ void main() {
|
|||
// vu.Q = gen.fog.x() / gen.vtx_p0.w();
|
||||
float Q = fog_constants.x / transformed.w;
|
||||
|
||||
fog = 255 - clamp(-transformed.w + hvdf_offset.w, fog_constants.z, fog_constants.y);
|
||||
fog = 255 - clamp(-transformed.w + hvdf_offset.w, fog_constants.y, fog_constants.z);
|
||||
|
||||
// itof12.xyz vf18, vf22 texture int to float
|
||||
// vu.vf18.itof12(Mask::xyz, vu.vf22);
|
||||
|
|
|
@ -30,5 +30,5 @@ void main() {
|
|||
discard;
|
||||
}
|
||||
|
||||
color.xyz = mix(color.xyz, fog_color.rgb, clamp(fog, 0, 1));
|
||||
color.xyz = mix(color.xyz, fog_color.rgb, clamp(fog_color.a * fog, 0, 1));
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ void main() {
|
|||
|
||||
|
||||
float Q = fog_constants.x / transformed[3];
|
||||
fog = (255 - clamp(-transformed.w + hvdf_offset.w, fog_constants.z, fog_constants.y))/255.0;
|
||||
fog = 255 - clamp(-transformed.w + hvdf_offset.w, fog_constants.y, fog_constants.z);
|
||||
|
||||
transformed.xyz *= Q;
|
||||
transformed.xyz += hvdf_offset.xyz;
|
||||
|
|
Loading…
Reference in a new issue