-
Notifications
You must be signed in to change notification settings - Fork 1
Registers
Ty edited this page Mar 28, 2024
·
2 revisions
Register parameters are separated into two types, 'arguments' and 'modifiers'. This was a poor naming choice, and should be changed in the future.
In the context of scripting with gifscript, these two parameters are position independent of one another.
For example, the following is valid gifscript, despite mixing modifiers (modulate and ct24) and arguments (number literals):
// Set TEX0 to modulate, texture address is 0x1000, format is ct24, buffer width is 10, TW/TH is 7,7
tex0 modulate 0x1000 ct24 10 7,7
In some cases, a register can receive multiple of the same literal. I've done my best to try and document this, but this works like a stack, where each literal is 'pushed' to the register. If a literal is noted with (In Order), this means the first literal pushed is treated as the first literal listed, then the second and so on.
prim
none
- Primitive Types (Only one active)
pointlinelinestrip-
triangle,tri -
trianglestrip,tristrip -
trianglefan,trifan -
sprite,rect,quad
- General Modifiers
-
gouraud-> Gouraud Shading -
fogging,fog-> Fogging Enable -
aa1-> Anti Aliasing -
texture,textured-> Texturing enable
-
rgbaqrgba
-
vec3(R,G,B) -> Alpha is set to 0xff (may be changed to 0x7f in the future) -
vec4(R,G,B,A)
none
uv
-
vec2(U,V) -> gifscript automatically shifts U and V. There is no support for half-pixel offsets currently.
None
xyz2
-
vec3(X,Y,Z) -> gifscript automatically shifts X and Y. There is no support for half-pixel offsets currently.
none
tex0
-
integer(In order)- TBP
- TBW
- TW
- TH
-
vec2(TW,TH)*
- You can optionally set TW and TH by pushing integers, or by passing a VEC2
- Texture Formats (Only one active)
-
ct32,psmct32-> RGBA32 -
ct24,psmct24-> RGB24 -
ct16,psmct16-> RGBA16
-
- Texture Functions (Only one active)
-
modulate-> View GS documentation -
decal-> Sample the texture as is (Default) -
highlight-> View GS documentation -
highlight2-> View GS documentation
-
fog
-
integer(F)
none
fogcol
-
vec3(R,G,B)
none
scissor
-
vec4(SCAX0,SCAX1,SCAY0,SCAY1)
none
signal
-
integer(ID) <-- IDMASK is set to ~0 -
vec2(ID,IDMSK)
none
finish
-
integer(IGNORED) - TODO:
none
none
label
-
integer(ID) <-- IDMSK is set to ~0 -
vec2(ID,IDMSK)
none