mirror of
https://github.com/open-goal/jak-project
synced 2026-09-10 20:29:51 -04:00
[jak 2] add lightning renderer (#2203)
Implements the jak 2 lightning renderer as an alternate path through Generic2. Also set up some generic stuff in the goal code. There is a problem with the texture pool, which doesn't support the case where two textures have the same tbp, but different cluts. So lightning is often the wrong color (usually red).
This commit is contained in:
+56
-8
@@ -372,20 +372,68 @@
|
||||
)
|
||||
(cond
|
||||
((zero? a1-1)
|
||||
(set! (-> v1-3 base-strgif qword vector4w y) #x303e4000)
|
||||
(set! (-> v1-3 base-strgif qword vector4w x) #x303ec000)
|
||||
(set! (-> v1-3 base-strgif str-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
(set! (-> v1-3 base-strgif fan-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
)
|
||||
((= a1-1 1)
|
||||
(set! (-> v1-3 base-strgif qword vector4w y) #x303d4000)
|
||||
(set! (-> v1-3 base-strgif qword vector4w x) #x303d4000)
|
||||
(set! (-> v1-3 base-strgif str-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
(set! (-> v1-3 base-strgif fan-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
)
|
||||
((= a1-1 2)
|
||||
(set! (-> v1-3 base-strgif qword vector4w y) #x30364000)
|
||||
(set! (-> v1-3 base-strgif qword vector4w x) #x3036c000)
|
||||
(set! (-> v1-3 base-strgif str-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
(set! (-> v1-3 base-strgif fan-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
)
|
||||
((= a1-1 3)
|
||||
(set! (-> v1-3 base-strgif qword vector4w y) #x30354000)
|
||||
(set! (-> v1-3 base-strgif qword vector4w x) #x3036c000)
|
||||
(set! (-> v1-3 base-strgif str-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
(set! (-> v1-3 base-strgif fan-prim)
|
||||
(new 'static 'gif-tag-prim
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user