★ FAQ ★ SGL programming related VDP2 Manual 12.1 Color calculation The data corresponding to the color calculation control register is set.
If this function is not called, the color calculation is not performed. This is the same as the initial state of hardware.
As an image, the slLookAt function should be thought of as performing operations such as slTranslate and slRot * once in the current matrix for the camera coordinates.
If you give the local coordinate data for the current matrix as an argument, the value converted to the 2D coordinate system will be returned.
This converter supports all modes of DGT2, so the PP format can also be converted.
This tool is located in SATURN \ SGL \ TOOL.
Another method is to prepare only the data part that is different for each stage in a separate section.
Is to do.
The shadow model then becomes a shadow parallel to the y-axis plane. If the ground is not parallel to the y-axis, changing the component given to slScale (specifically, it is related to the normal vector) will give a shadow like that.
You can also play with the matrix directly.
In this case, you can expect the effect of tilting the sun and extending the shadow.
1 0 0 slMulFX (slSin (ang), long) 0 slMulFX (slCos (ang), long) 0 0 1
Shadow orientation by changing ang
You can adjust the length of the shadow by changing the long.
In SGL, the screen position is managed by the system variables MsScreenDist and SlScreenDist. Therefore, by using the position where near clipping is applied in combination with the system variable "MsZdpsfcnt", you can find out which coordinates are the boundary values.
★ FAQ ★ SGL programming related