mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
[jak3] fix envmap texture and strength (#3704)
Fix the envmap texture using the eye texture by default (will require a re-extract to fix), fix envmap strength in all three games being off by 2x. (oops) With envmap scale fix:  without envmap scale fix (but with texture fix):  --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
@@ -853,12 +853,19 @@ ConvertedMercEffect convert_merc_effect(const MercEffect& input_effect,
|
||||
u32 tidx = (env >> 8) & 0b1111'1111'1111;
|
||||
tex_combo = (((u32)tpage) << 16) | tidx;
|
||||
} break;
|
||||
case GameVersion::Jak2:
|
||||
case GameVersion::Jak3: {
|
||||
case GameVersion::Jak2: {
|
||||
u32 tpage = 0x1f;
|
||||
u32 tidx = 2;
|
||||
tex_combo = (((u32)tpage) << 16) | tidx;
|
||||
} break;
|
||||
case GameVersion::Jak3: {
|
||||
// (define *generic-envmap-texture* (get-texture pal-environment-front environment-generic))
|
||||
// (defconstant environment-generic 2) tpage
|
||||
// (def-tex pal-environment-front environment-generic 1) texture
|
||||
u32 tpage = 2;
|
||||
u32 tidx = 1;
|
||||
tex_combo = (((u32)tpage) << 16) | tidx;
|
||||
} break;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
@@ -1085,8 +1085,6 @@ u64 type_typep(Ptr<Type> t1, Ptr<Type> t2) {
|
||||
|
||||
u64 method_set(u32 type_, u32 method_id, u32 method) {
|
||||
Ptr<Type> type(type_);
|
||||
if (method_id > 255)
|
||||
printf("[METHOD SET ERROR] tried to set method %d\n", method_id);
|
||||
|
||||
auto existing_method = type->get_method(method_id).offset;
|
||||
|
||||
|
||||
@@ -1423,7 +1423,8 @@
|
||||
)
|
||||
(cond
|
||||
((or (nonzero? (-> bucket-info must-use-mercneric-for-clip))
|
||||
(or (< 0.0 t-amount) (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)))
|
||||
;; force envmap mode, even if strength is zero - PC renderer will handle this case.
|
||||
(or #|(< 0.0 t-amount)|# #t (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)))
|
||||
)
|
||||
(let ((a0-33 (&-> tint-info tint))
|
||||
(v1-74 (the-as object (-> bucket-info effect effect-idx)))
|
||||
|
||||
@@ -2102,7 +2102,8 @@
|
||||
)
|
||||
(cond
|
||||
((or (nonzero? (-> bucket-info must-use-mercneric-for-clip))
|
||||
(or (< 0.0 t-amount) (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)))
|
||||
;; force envmap mode, even if strength is zero - PC renderer will handle this case.
|
||||
(or #t #|(< 0.0 t-amount)|# (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)))
|
||||
)
|
||||
(let ((a0-33 (&-> tint-info tint))
|
||||
(v1-74 (the-as object (-> bucket-info effect effect-idx)))
|
||||
|
||||
Reference in New Issue
Block a user